{"action":"opened","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/9368","labels_url":"https://api.github.com/repos/laravel/framework/issues/9368/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/9368/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/9368/events","html_url":"https://github.com/laravel/framework/issues/9368","id":90074751,"number":9368,"title":"[5.1] Testing http calls with headers doesn't work","user":{"login":"max-me","id":467159,"avatar_url":"https://avatars.githubusercontent.com/u/467159?v=3","gravatar_id":"","url":"https://api.github.com/users/max-me","html_url":"https://github.com/max-me","followers_url":"https://api.github.com/users/max-me/followers","following_url":"https://api.github.com/users/max-me/following{/other_user}","gists_url":"https://api.github.com/users/max-me/gists{/gist_id}","starred_url":"https://api.github.com/users/max-me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/max-me/subscriptions","organizations_url":"https://api.github.com/users/max-me/orgs","repos_url":"https://api.github.com/users/max-me/repos","events_url":"https://api.github.com/users/max-me/events{/privacy}","received_events_url":"https://api.github.com/users/max-me/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-22T11:29:37Z","updated_at":"2015-06-22T11:29:37Z","closed_at":null,"body":"If you'll try to test any http call with sending a header, it will not work. You won't see your header at all.\r\n\r\nExample:\r\n```php\r\n# Test\r\n$this->get('/foo', [\r\n\t'Accept' => 'application/json',\r\n\t'Content-Type' => 'application/json',\r\n]);\r\n```\r\n\r\n```php\r\n# Route\r\n$router->get('foo', function() {\r\n\tdd(\\App::make('request')->headers);\r\n});\r\n```\r\n\r\nResult:\r\n```\r\nSymfony\\Component\\HttpFoundation\\HeaderBag {#292\r\n  #headers: array:5 [\r\n    \"host\" => array:1 [\r\n      0 => \"localhost\"\r\n    ]\r\n    \"user-agent\" => array:1 [\r\n      0 => \"Symfony/2.X\"\r\n    ]\r\n    \"accept\" => array:1 [\r\n      0 => \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\"\r\n    ]\r\n    \"accept-language\" => array:1 [\r\n      0 => \"en-us,en;q=0.5\"\r\n    ]\r\n    \"accept-charset\" => array:1 [\r\n      0 => \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\"\r\n    ]\r\n  ]\r\n  #cacheControl: []\r\n}\r\n```"}}