{"action":"created","issue":{"url":"https://api.github.com/repos/guzzle/guzzle/issues/1556","repository_url":"https://api.github.com/repos/guzzle/guzzle","labels_url":"https://api.github.com/repos/guzzle/guzzle/issues/1556/labels{/name}","comments_url":"https://api.github.com/repos/guzzle/guzzle/issues/1556/comments","events_url":"https://api.github.com/repos/guzzle/guzzle/issues/1556/events","html_url":"https://github.com/guzzle/guzzle/issues/1556","id":171047393,"number":1556,"title":"Add the ability to forward headers","user":{"login":"kamranahmedse","id":4921183,"avatar_url":"https://avatars.githubusercontent.com/u/4921183?v=3","gravatar_id":"","url":"https://api.github.com/users/kamranahmedse","html_url":"https://github.com/kamranahmedse","followers_url":"https://api.github.com/users/kamranahmedse/followers","following_url":"https://api.github.com/users/kamranahmedse/following{/other_user}","gists_url":"https://api.github.com/users/kamranahmedse/gists{/gist_id}","starred_url":"https://api.github.com/users/kamranahmedse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamranahmedse/subscriptions","organizations_url":"https://api.github.com/users/kamranahmedse/orgs","repos_url":"https://api.github.com/users/kamranahmedse/repos","events_url":"https://api.github.com/users/kamranahmedse/events{/privacy}","received_events_url":"https://api.github.com/users/kamranahmedse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-14T08:02:18Z","updated_at":"2016-08-16T21:57:15Z","closed_at":null,"body":"I have been working in a service oriented architecture where there are many small APIs involved. And each of the API uses Guzzle to make requests to the external APIs. Here is how it looks like\r\n\r\n```\r\n---------,        ,-----------,        ,---------,\r\nClient    | ----> | API - 1   | -----> | API - 2 |\r\n---------'        '-----------'        '---------'\r\n```\r\n\r\nNow, as you can see the `API-1` is requesting the `API-2` on behalf of the client so for `API-2` to consider the actual client as the client instead of `API-1` as the client, what I want is to forward the client's headers on the request instead of the server's.\r\n\r\nWhat I am doing right now is manually setting the required headers. However it would be beneficial to have some option e.g. `forward_headers` that would automatically forward the actual headers alongside the request."},"comment":{"url":"https://api.github.com/repos/guzzle/guzzle/issues/comments/240252411","html_url":"https://github.com/guzzle/guzzle/issues/1556#issuecomment-240252411","issue_url":"https://api.github.com/repos/guzzle/guzzle/issues/1556","id":240252411,"user":{"login":"Tobion","id":610090,"avatar_url":"https://avatars.githubusercontent.com/u/610090?v=3","gravatar_id":"","url":"https://api.github.com/users/Tobion","html_url":"https://github.com/Tobion","followers_url":"https://api.github.com/users/Tobion/followers","following_url":"https://api.github.com/users/Tobion/following{/other_user}","gists_url":"https://api.github.com/users/Tobion/gists{/gist_id}","starred_url":"https://api.github.com/users/Tobion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Tobion/subscriptions","organizations_url":"https://api.github.com/users/Tobion/orgs","repos_url":"https://api.github.com/users/Tobion/repos","events_url":"https://api.github.com/users/Tobion/events{/privacy}","received_events_url":"https://api.github.com/users/Tobion/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T21:57:14Z","updated_at":"2016-08-16T21:57:14Z","body":"So you mean to forward headers of an incoming PSR-7 `RequestInterface` to a Guzzle request that is sent to your `API -1/2`? That sounds like 5 lines of code.\r\n\r\nCan you give a concrete usage example as I don't how you imagine this to work."}}
{"actor":{"display_login":"Tobion"}}