localtools / php-http-client
Human-friendly and powerful HTTP client package for PHP
v0.0.1
2023-12-18 04:01 UTC
Requires
- php: ^7.2.5 || ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- ext-curl: *
- bamarni/composer-bin-plugin: ^1.8.2
- pestphp/pest: ^1.23
- php-http/client-integration-tests: dev-master#2c025848417c1135031fdf9c728ee53d0a7ceaee as 3.0.999
- php-http/message-factory: ^1.1
- phpunit/phpunit: ^8.5.36 || ^9.6.15
- psr/log: ^1.1 || ^2.0 || ^3.0
Suggests
- ext-curl: Required for CURL handler support
- ext-intl: Required for Internationalized Domain Name (IDN) support
- psr/log: Required for using the Log middleware
Provides
README
This package provides a simple and powerful HTTP client for PHP, built on top of Guzzle. It simplifies the process of making HTTP requests and allows for easy customization of request options.
$client = new \PhpHttpClient\Client('https://api.example.com'); $response = $client->get('/endpoint'); echo $response->getStatusCode(); // 200
Installation
The recommended way to install PhpHttpClient is through Composer.
composer require localtools/php-http-client
Features
- Fluent interface for building HTTP requests
- Support for various authentication methods (Basic, Digest)
- Easy integration with PSR-7 and PSR-18
- Built on top of Guzzle, leveraging its power and flexibility