egeloen / http-adapter
Issue HTTP request for PHP 5.4.8+.
Installs: 7 823 819
Dependents: 22
Suggesters: 15
Security: 0
Stars: 158
Watchers: 10
Forks: 17
Open Issues: 0
Requires
- php: >=5.4.8
- zendframework/zend-diactoros: ^1.1
Requires (Dev)
- ext-curl: *
- cakephp/cakephp: ^3.0.3
- doctrine/cache: ^1.4
- guzzle/guzzle: ^3.9.4@dev
- guzzlehttp/guzzle: ^4.1.4|^5.0|^6.0
- kriswallsmith/buzz: ~0.13
- nategood/httpful: ^0.2.17
- phpunit/phpunit: ^4.0|^5.0
- phpunit/phpunit-mock-objects: ^2.1|^3.0
- psr/log: ^1.0
- react/dns: ^0.4.1
- react/http-client: ^0.4
- rmccue/requests: ^1.7
- symfony/event-dispatcher: ^2.0|^3.0
- symfony/phpunit-bridge: ^2.7|^3.0
- symfony/stopwatch: ^2.2|^3.0
- tedivm/stash: ~0.13
- zendframework/zend-http: ^2.3.4
- zendframework/zendframework1: ^1.12.9
Suggests
- ext-curl: Allows you to use the cURL adapter
- ext-http: Allows you to use the PECL adapter
- doctrine/cache: Allows you to use the cache event subscriber
- guzzle/guzzle: Allows you to use the Guzzle 3 adapter
- guzzlehttp/guzzle: Allows you to use the Guzzle 4 adapter
- kriswallsmith/buzz: Allows you to use the Buzz adapter
- nategood/httpful: Allows you to use the Httpful adapter
- psr/log: Allows you to use the logger event subscriber
- rmccue/requests: Allows you to use the Requests adapter
- symfony/event-dispatcher: Allows you to use the event lifecycle
- symfony/stopwatch: Allows you to use the stopwatch http adapter and event subscriber
- tedivm/stash: Allows you to use the cache event subscriber
- zendframework/zend-http: Allows you to use the Zend 2 adapter
- zendframework/zendframework1: Allows you to use the Zend 1 adapter
README
Before starting, be aware this package is deprecated in favor of php-http. That means bugfixes would be accepted but new features will not (except maybe for already opened PRs).
Introduction
The library allows to issue HTTP requests with PHP 5.4.8+. The supported adapters are:
- Buzz
- Cake
- cURL
- FileGetContents
- Fopen
- Guzzle3
- Guzzle4
- Guzzle5
- Guzzle6
- Httpful
- Pecl Http
- React
- Requests
- Socket
- Zend1
- Zend2
Additionally, it follows the PSR-7 Standard which defines how http message should be implemented.
Documentation
Cookbook
- Log requests, responses and exceptions
- Journalize requests and responses
- Throw exceptions for errored responses
- Retry errored requests
- Follow redirects
- Cache responses and exceptions
- Manage cookies
Testing
The library is fully unit tested by PHPUnit with a code coverage close to 100%. To execute the test suite, check the travis configuration.
Contribute
We love contributors! The library is open source, if you'd like to contribute, feel free to propose a PR! You can follow the CONTRIBUTING file which will explain you how to set up the project.
License
The Ivory Http Adapter is under the MIT license. For the full copyright and license information, please read the LICENSE file that was distributed with this source code.