Fast Forward PSR-18 HTTP Client Factory
    • Fastforward-Http-Client
      • Getting Started
        • Installation
        • Quickstart
      • Usage
        • Getting Services
        • Using The PSR-18 Client
        • Using The Native Symfony Client
        • Use Cases
      • Advanced Topics
        • Integration
        • Overriding Services
      • API Reference
        • HttpClientServiceProvider
        • Registered Services
      • Links
        • Dependencies
      • FAQ
      • Compatibility
    • Namespaces
      • FastForward
        • Http
          • Client
            • ServiceProvider
    • Packages
      • FastForward
        • Http
          • Client
    • Reports
      • Deprecated
      • Errors
      • Markers
    • Indices
      • Files

    Usage

    The package exposes only two service IDs, but they serve different audiences:

    • use Psr\Http\Client\ClientInterface when your application should stay on the PSR-18 contract;
    • use Symfony\Component\HttpClient\HttpClient when you intentionally want Symfony-specific features such as request() and withOptions() .

    The pages below explain how to retrieve those services, how they relate to PSR-17 factories, and which path is usually best for new code.

    • Getting Services
      • Service Map
      • Retrieving Services
      • Choosing The Right ID
      • Important Dependencies
    • Using The PSR-18 Client
      • Sending A Basic Request
      • Sending JSON Or Other Bodies
      • Error Handling
      • Gotcha For New Users
    • Using The Native Symfony Client
      • Resolving The Native Client
      • Creating A Scoped Client
      • When This Path Fits Best
    • Use Cases
      • Injecting A Client Into An Application Service
      • Using The Package In A Fresh FastForward Project
      • Using The Metapackage For Faster Onboarding
      • Choosing The Right Shape
      • Next Step
    Search results