m6web / request-headers-forwarder-guzzle-bundle
此包已弃用且不再维护。未建议替代包。
Symfony Bundle,用于从当前请求中获取一些HTTP头,并在Guzzle客户端子请求中重复使用。
v1.0.2
2017-11-30 15:15 UTC
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,用于从当前请求中获取一些HTTP头,并在Guzzle客户端子请求中重复使用。
“用例”之一可能是当你调用一个前端API,它会对另一个需要认证HTTP头的API进行子请求时... 使用此包,你可以使用认证头调用前端API,并让它无缝地将这些头转发到其他API。
配置
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'
建议
- GuzzleHttp Bundle,用于轻松实例化和配置Guzzle客户端服务。