Download the PHP package fast-forward/http-client without Composer
On this page you can find all versions of the php package fast-forward/http-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fast-forward/http-client
More information about fast-forward/http-client
Files in fast-forward/http-client
Package http-client
Short Description Fast Forward PSR-18 HTTP Client Factory
License MIT
Homepage https://github.com/php-fast-forward
Informations about the package http-client
FastForward HTTP Client
FastForward HTTP Client is a focused integration package that registers a
PSR-18 HTTP client in a FastForward-compatible container. It uses Symfony
HttpClient as the transport layer and exposes
Psr\Http\Client\ClientInterface for application code.
What this package does
- Registers
Psr\Http\Client\ClientInterfaceasSymfony\Component\HttpClient\Psr18Client - Registers
Symfony\Component\HttpClient\HttpClientthroughHttpClient::create() - Fits naturally into
fast-forward/containerservice-provider based configuration
Important note for first-time users
This package does not register PSR-17 factories on its own. To resolve
Psr\Http\Client\ClientInterface, your container must already provide:
Psr\Http\Message\ResponseFactoryInterfacePsr\Http\Message\StreamFactoryInterface
In a FastForward application, the usual solution is to install
fast-forward/http-factory
or the all-in-one
fast-forward/http metapackage.
Installation
Install the package itself:
Choose one of these setups:
- If your container already provides PSR-17 factories,
fast-forward/http-clientis enough. - If you want explicit FastForward PSR-17 and PSR-18 providers, install
fast-forward/http-client fast-forward/http-factory. - If you want the shortest onboarding path, install
fast-forward/http.
Quick start
This example uses both fast-forward/http-factory and
fast-forward/http-client so it works in a fresh project:
Registered services
| Service ID | Resolved object | Typical use |
|---|---|---|
Psr\Http\Client\ClientInterface |
Symfony\Component\HttpClient\Psr18Client |
Portable PSR-18 application code |
Symfony\Component\HttpClient\HttpClient |
A runtime-selected Symfony\Contracts\HttpClient\HttpClientInterface implementation |
Native Symfony HttpClient features |
Documentation
The Sphinx documentation in docs/ now covers:
- installation paths for beginners
- the dependency on PSR-17 factories
- direct Symfony client usage versus PSR-18 usage
- override patterns for timeouts, headers, and base URIs
- compatibility notes and FAQ entries for common setup mistakes
License
This package is open-source software licensed under the MIT License.
Contributing
Contributions, issues, and pull requests are welcome at php-fast-forward/http-client.
All versions of http-client with dependencies
fast-forward/container Version ^1.4
psr/http-client Version ^1.0
psr/http-factory Version ^1.1
symfony/http-client Version ^7.3