ez-php / http-client
HTTP client module for the ez-php framework — fluent cURL-based client for making outgoing HTTP requests
0.2.0
2026-03-15 03:47 UTC
Requires
- php: ^8.5
- ext-curl: *
- ez-php/framework: 0.*
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.94
- phpstan/phpstan: ^2.1
- phpstan/phpstan-deprecation-rules: ^2.0
- phpstan/phpstan-strict-rules: ^2.0
- phpunit/phpunit: ^13.0
README
HTTP client module for the ez-php framework — fluent cURL-based client for making outgoing HTTP requests.
Requirements
- PHP 8.5+
- ext-curl
- ez-php/framework ^1.0
Installation
composer require ez-php/http-client
Setup
Register the service provider:
$app->register(\EzPhp\HttpClient\HttpClientServiceProvider::class);
Usage
$http = $app->make(\EzPhp\HttpClient\Http::class); $response = $http->get('https://api.example.com/users'); $response = $http->post('https://api.example.com/users', ['name' => 'Alice']); echo $response->status(); // 200 echo $response->body(); // raw response body $data = $response->json(); // decoded JSON
License
MIT — Andreas Uretschnig