PHPackages                             phpro/http-tools - 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. phpro/http-tools

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

phpro/http-tools
================

HTTP tools for developing more consistent HTTP implementations.

2.14.0(3mo ago)28150.5k↓52.5%7[1 PRs](https://github.com/phpro/http-tools/pulls)MITPHPPHP ~8.4.0 || ~8.5.0CI passing

Since Sep 26Pushed 2mo ago4 watchersCompare

[ Source](https://github.com/phpro/http-tools)[ Packagist](https://packagist.org/packages/phpro/http-tools)[ RSS](/packages/phpro-http-tools/feed)WikiDiscussions v2.x Synced yesterday

READMEChangelog (10)Dependencies (131)Versions (33)Used By (0)

[![Github Actions](https://github.com/phpro/http-tools/workflows/GrumPHP/badge.svg?branch=master)](https://github.com/phpro/http-tools/workflows/GrumPHP/badge.svg?branch=master)[![Installs](https://camo.githubusercontent.com/72fd48ed0a379beea96a84c32297219dbcca169d2ebae3788c351d95b7ddadc4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706870726f2f687474702d746f6f6c732e737667)](https://packagist.org/packages/phpro/http-tools/stats)[![Packagist](https://camo.githubusercontent.com/41de3aa6cab4c4f70d0062fab2a1004e58a5c4279bf443f04051053bae10f39c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706870726f2f687474702d746f6f6c732e737667)](https://packagist.org/packages/phpro/http-tools)

HTTP-Tools
==========

[](#http-tools)

The goal of this package is to provide you some tools to set-up a data-centric, consistent HTTP integration. The HTTP client implementation you want to use is just a small implementation detail and doesn't matter. However, here are some default guidelines:

Prerequisites
-------------

[](#prerequisites)

Choosing what HTTP package you want to us is all up to you. We do require a PSR implementations in order to install this package:

- PSR-7: `psr/http-message-implementation` like `nyholm/psr7` or `guzzlehttp/psr7`
- PSR-17: `psr/http-factory-implementation` like `nyholm/psr7` or `guzzlehttp/psr7`
- PSR-18: `psr/http-client-implementation` like `symfony/http-client` or `guzzlehttp/guzzle`

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

[](#installation)

```
composer require phpro/http-tools
```

Setting up an HTTP client :
---------------------------

[](#setting-up-an-http-client-)

You can choose whatever HTTP client you want. However, this package provides some convenient factories that make the configuration a bit easier.

The factory accepts a list of implementation specific plugins / middlewares. Besides that, you can configure implementation-specific options like a base\_uri or default headers.

```
