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\ResponseFactoryInterface
and
Psr\Http\Message\StreamFactoryInterface
. In a FastForward application,
the usual solution is to register
FastForward\Http\Message\Factory\ServiceProvider\HttpMessageFactoryServiceProvider
from fast-forward/http-factory
or to install fast-forward/http
.
FastForward HTTP Client
FastForward HTTP Client is a focused integration package for projects that want
to resolve a PSR-18 HTTP client from a FastForward-compatible container. It
connects Symfony HttpClient to PSR contracts so application code can depend on
Psr\Http\Client\ClientInterface
while still keeping a direct path to
Symfony's native client when needed.
If you are new to the package, start with Installation and Quickstart. If you want the shortest path to a full FastForward HTTP stack, consider the fast-forward/http metapackage, which bundles this package together with the matching FastForward HTTP factory provider.
Useful Links
What You Will Find Here
- a beginner-first setup guide for
fast-forward/http-clienton its own and in combination withfast-forward/http-factory; - an explanation of the two registered service IDs, what they resolve to, and when to use each one;
- practical examples for PSR-18 requests, direct Symfony HttpClient usage, and common override patterns;
- API notes for
HttpClientServiceProviderand the external classes it collaborates with; - compatibility and troubleshooting notes for first-time users.
Contents:
- Getting Started
- Usage
- Advanced Topics
- API Reference
- Links
-
FAQ
- What does this package actually register?
- Why is installing this package alone sometimes not enough?
- Do I need fast-forward/http-factory?
- Which service should I inject in my own classes?
- Why does $container->get(HttpClient::class) not return an actual HttpClient object?
- Do 4xx and 5xx responses throw exceptions?
- Does this package register request, response, stream, or URI factories?
- How do I set headers, timeouts, or a base URI?
- Can I replace Symfony with another PSR-18 implementation?
- Can I use this package outside fast-forward/container?
- What versions should I check before upgrading?
- Why does getExtensions() return an empty array?
- Compatibility