m6web / request-headers-forwarder-guzzle-bundle
Symfony Bundle which fetch some HTTP headers from current request and reuse them in Guzzle clients sub-requests.
Installs: 28 521
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 35
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- php: ~5.5|~7.0
- guzzlehttp/guzzle: ~6.0
Requires (Dev)
- atoum/atoum: ^2.8|^3.0
- m6web/coke: ~1.2
- m6web/symfony2-coding-standard: ~1.2
- symfony/symfony: ~2.7|~3.0
Suggests
- m6web/guzzle-http-bundle: Easily set up Guzzle clients as Symfony services.
This package is auto-updated.
Last update: 2022-03-27 14:01:43 UTC
README
Symfony Bundle which fetch some HTTP headers from current request and reuse them in Guzzle clients sub-requests.
One of the "use case" may be when you call a frontal API which make a sub-request to another API which needs authentication HTTP headers... Using this bundle, you can call the frontal API with authentication headers and let it forward them seamlessly to other APIs.
Configuration
m6_web_request_headers_forwarder_guzzle: clients: test.guzzle1: # Guzzle client service id headers: ['x-auth-sample', 'something'] # Headers that will be forwarded to "test.guzzle1" client requests services: test.guzzle1: class: 'GuzzleHttp\Client'
Suggest
- GuzzleHttp Bundle to easily instantiate and configure Guzzle client services.