cognesy / instructor-http-client
Polyglot's unified HTTP connectivity layer
v2.3.1
2026-03-30 09:17 UTC
Requires
- php: ^8.3
- cognesy/instructor-config: ^2.3
- cognesy/instructor-events: ^2.3
- cognesy/instructor-logging: ^2.3
- cognesy/instructor-setup: ^2.3
- cognesy/instructor-telemetry: ^2.3
- cognesy/instructor-utils: ^2.3
Requires (Dev)
- guzzlehttp/guzzle: ^7.4
- guzzlehttp/psr7: ^2.7
- icanhazstring/composer-unused: ^0.9.0
- jetbrains/phpstorm-attributes: ^1.2
- maglnet/composer-require-checker: ^4.16
- mockery/mockery: ^1.6
- pestphp/pest: ^2.34
- phpstan/phpstan: ^1.11
- roave/security-advisories: dev-latest
- symfony/http-client: ^7.3
- vimeo/psalm: ^6.0
Suggests
- psr/http-client: *
- psr/http-message: *
- symfony/http-client: For Symfony HTTP client support
This package is auto-updated.
Last update: 2026-05-30 11:59:04 UTC
README
Minimal HTTP transport for sync and streaming requests.
Example
use Cognesy\Http\Data\HttpRequest; use Cognesy\Http\HttpClient; $client = HttpClient::default(); $response = $client->send(new HttpRequest( url: 'https://api.example.com/health', method: 'GET', headers: ['Accept' => 'application/json'], body: '', options: [], ))->get(); echo $response->statusCode();
Docs
packages/http-client/docs/1-overview.mdpackages/http-client/docs/2-getting-started.mdpackages/http-client/docs/3-making-requests.mdpackages/http-client/docs/4-handling-responses.mdpackages/http-client/docs/5-streaming-responses.mdpackages/http-client/docs/10-middleware.md
Pooling lives in packages/http-pool.