cognesy / instructor-http-client
Polyglot's unified HTTP connectivity layer
v1.22.0
2026-01-20 19:39 UTC
Requires
- php: ^8.3
- cognesy/instructor-config: ^1.22
- cognesy/instructor-events: ^1.22
- cognesy/instructor-setup: ^1.22
- cognesy/instructor-utils: ^1.22
Requires (Dev)
- guzzlehttp/guzzle: ^7.4
- guzzlehttp/psr7: ^2.7
- icanhazstring/composer-unused: ^0.9.0
- illuminate/http: ^12.20
- 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
- illuminate/http: For Laravel HTTP client support
- psr/http-client: *
- psr/http-message: *
- symfony/http-client: For Symfony HTTP client support
- dev-main
- v1.22.0
- v1.21.0
- v1.20.0
- v1.19.0
- v1.18.4
- v1.18.3
- v1.18.2
- v1.18.1
- v1.18.0
- v1.17.0
- v1.16.0
- v1.15.0
- v1.14.0
- v1.13.0
- v1.12.0
- v1.11.0
- v1.10.3
- v1.10.2
- v1.10.1
- v1.10.0
- v1.9.1
- v1.9.0
- v1.8.1
- v1.8.0
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.2
- v1.4.1
- v1.4.0
- v1.3.0
- v1.2.0
- v1.1.0
- v1.0.1-RC13
- v1.0.0
- v1.0.0-RC22
- v1.0.0-RC21
- v1.0.0-RC20
- v1.0.0-RC19
- v1.0.0-RC18
- v1.0.0-RC17
- v1.0.0-RC16
- v1.0.0-RC15
- v1.0.0-RC14
- v1.0.0-RC13
- v1.0.0-RC12
- v1.0.0-RC11
- v1.0.0-RC10
- v1.0.0-RC9
- 1.0.0-RC8
- 1.0.0-RC7
- 1.0-rc4
- 1.0-rc3
- 1.0-rc2
- 1.0-rc1
- 0.17.11
- 0.17.10
- 0.17.8
- 0.17.7
- 0.17.5
- 0.17.3
- 0.17.2
- 0.17.1
- 0.17.0
- 0.16.4
- 0.16.3
- 0.16.2
- 0.16.0
- 0.15.2
- 0.15.1
- 0.15.0
- 0.14.7
- 0.14.6
- 0.14.5
- 0.14.4
- 0.14.3
- 0.14.2
- 0.14.1
- 0.14.0
- 0.13.9
This package is auto-updated.
Last update: 2026-03-02 13:50:00 UTC
README
Framework-agnostic HTTP transport layer used by Instructor for sync, streaming, and pooled requests.
Example
use Cognesy\Http\Data\HttpRequest; use Cognesy\Http\HttpClient; $client = HttpClient::default(); $request = new HttpRequest( url: 'https://api.example.com/health', method: 'GET', headers: ['Accept' => 'application/json'], body: '', options: [], ); $response = $client->withRequest($request)->get(); echo $response->statusCode();
Documentation
For usage details, read the package docs:
packages/http-client/docs/1-overview.mdpackages/http-client/docs/2-getting-started.mdpackages/http-client/docs/_meta.yaml(navigation order)
2.0 API scope notes:
packages/http-client/V2_API_SURFACE.mdpackages/http-client/V2_CORE_SCOPE.md