PHPackages                             juststeveking/http-slim - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. juststeveking/http-slim

ActiveLibrary[HTTP &amp; Networking](/categories/http)

juststeveking/http-slim
=======================

A slim psr compliant http client to provide better interoperability.

v2.1.0(4y ago)770.8k↑17.9%3[1 PRs](https://github.com/JustSteveKing/http-slim/pulls)1MITPHPPHP ^8.0

Since May 29Pushed 3y agoCompare

[ Source](https://github.com/JustSteveKing/http-slim)[ Packagist](https://packagist.org/packages/juststeveking/http-slim)[ GitHub Sponsors](https://github.com/JustSteveKing)[ RSS](/packages/juststeveking-http-slim/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (16)Versions (8)Used By (1)

Http Slim
=========

[](#http-slim)

[![Latest Version](https://camo.githubusercontent.com/bb7457e51e8c2c6e2f409d619448e3dfe2719fd71a8e265e21ac7f0cd86be3c0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a75737473746576656b696e672f687474702d736c696d2e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://packagist.org/packages/juststeveking/http-slim)[![Software License](https://camo.githubusercontent.com/36971c1276bd498dd4325073b7e25fff91e392c1ec5fe116418626b37ed188e7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a75737473746576656b696e672f687474702d736c696d2e7376673f7374796c653d666c61742d737175617265)](https://github.com/JustSteveKing/http-slim/blob/master/LICENSE)[![PHP Version](https://camo.githubusercontent.com/85d6f4e692b0483642e2958278f2862e99d3412a71a2739169c3b3a512c2cdbc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a75737473746576656b696e672f687474702d736c696d2e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![run-tests](https://github.com/JustSteveKing/http-slim/workflows/run-tests/badge.svg)](https://github.com/JustSteveKing/http-slim/workflows/run-tests/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/7d5f783d30fbfd45ca1caa03f84a0d2d5560791ef7e4ab4ca581d4910cf9e4dd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a75737473746576656b696e672f687474702d736c696d2e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d6d656469756d76696f6c6574726564)](https://packagist.org/packages/juststeveking/http-slim)

The purpose of this package is to create an interoperable http client implementation allowing a "bring you own packages" approach to connection to 3rd party services.

The main goal of this package is to adhere to the following PSRs:

- [PSR-18 - HTTP Client](https://www.php-fig.org/psr/psr-18/)
- [PSR-17 - HTTP Factories](https://www.php-fig.org/psr/psr-17/)
- [PSR-7 - HTTP Message Interface](https://www.php-fig.org/psr/psr-7/)

Installation
------------

[](#installation)

Using composer:

```
$ composer require juststeveking/http-slim
```

You are then free to use it as needed within your projects.

Next steps
----------

[](#next-steps)

The next step is to install a compliant package to do the request itself.

A few packages that are recommended:

- [Guzzle](http://docs.guzzlephp.org/en/stable/)
- [Symfony HttpClient](https://symfony.com/doc/current/components/http_client.html)
- [A great PSR implementation with factories to adhere to PSR-18 fully](https://github.com/Nyholm/psr7)

Usage
-----

[](#usage)

Once you have installed a **PSR-18** package and a **PSR-17** package we do not *need* to do anything else. This package support HTTP Autodiscovery for your PSR compliant Client and Request factories. However, should you choose to inject you can do!

```
