{"action":"created","issue":{"url":"https://api.github.com/repos/guzzle/guzzle/issues/1058","labels_url":"https://api.github.com/repos/guzzle/guzzle/issues/1058/labels{/name}","comments_url":"https://api.github.com/repos/guzzle/guzzle/issues/1058/comments","events_url":"https://api.github.com/repos/guzzle/guzzle/issues/1058/events","html_url":"https://github.com/guzzle/guzzle/issues/1058","id":76750111,"number":1058,"title":"Headers missing -> Set-Cookie header missing","user":{"login":"isomis","id":3204363,"avatar_url":"https://avatars.githubusercontent.com/u/3204363?v=3","gravatar_id":"","url":"https://api.github.com/users/isomis","html_url":"https://github.com/isomis","followers_url":"https://api.github.com/users/isomis/followers","following_url":"https://api.github.com/users/isomis/following{/other_user}","gists_url":"https://api.github.com/users/isomis/gists{/gist_id}","starred_url":"https://api.github.com/users/isomis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isomis/subscriptions","organizations_url":"https://api.github.com/users/isomis/orgs","repos_url":"https://api.github.com/users/isomis/repos","events_url":"https://api.github.com/users/isomis/events{/privacy}","received_events_url":"https://api.github.com/users/isomis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-05-15T14:49:24Z","updated_at":"2015-05-15T18:15:51Z","closed_at":null,"body":"In Curl this is working:\r\n\r\n// login and get the cookie section\r\n$ch = curl_init();\r\ncurl_setopt($ch, CURLOPT_URL,$url);\r\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"username=test&secretkey=test\");\r\ncurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));\r\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\ncurl_setopt($ch, CURLOPT_HEADER, 1);\r\n$server_output = curl_exec ($ch);\r\n\r\n// get the header size\r\n$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);\r\n$header      = substr($server_output, 0, $header_size);\r\n\r\nprint_r($header);exit;\r\n\r\nWe get all the headers back we needed. But in Ghuzzle we dont get all the headers:\r\n\r\n\r\n\t\t$user = array(\r\n\t  'username' => 'test',\r\n\t  'secretkey' => 'test'\r\n\t);\r\n   \t$client = new GuzzleHttp\\Client();\r\n    $response = $client->post($url,array(\r\n            'body'   => $user\r\n        )\r\n    );\r\n\r\nprint_r($response->getHeaders());exit;\r\n\r\nIn postman the headers we are missing are the headers under the tab \"cookies\". I think ghuzzle dont process this cookies in headers. How can i retrieve them?"},"comment":{"url":"https://api.github.com/repos/guzzle/guzzle/issues/comments/102476966","html_url":"https://github.com/guzzle/guzzle/issues/1058#issuecomment-102476966","issue_url":"https://api.github.com/repos/guzzle/guzzle/issues/1058","id":102476966,"user":{"login":"isomis","id":3204363,"avatar_url":"https://avatars.githubusercontent.com/u/3204363?v=3","gravatar_id":"","url":"https://api.github.com/users/isomis","html_url":"https://github.com/isomis","followers_url":"https://api.github.com/users/isomis/followers","following_url":"https://api.github.com/users/isomis/following{/other_user}","gists_url":"https://api.github.com/users/isomis/gists{/gist_id}","starred_url":"https://api.github.com/users/isomis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isomis/subscriptions","organizations_url":"https://api.github.com/users/isomis/orgs","repos_url":"https://api.github.com/users/isomis/repos","events_url":"https://api.github.com/users/isomis/events{/privacy}","received_events_url":"https://api.github.com/users/isomis/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T18:15:51Z","updated_at":"2015-05-15T18:15:51Z","body":"@kamilsk  I tried but get a empty array:\r\n\r\n\t$user = array(\r\n\t  'username' => 'matthijs',\r\n\t  'secretkey' => 'matthijs'\r\n\t);\r\n   \t$client = new GuzzleHttp\\Client();\r\n\r\n\t$emitter = $client->getEmitter();\r\n\t$cookieJar = new \\GuzzleHttp\\Cookie\\CookieJar();\r\n\t$subscriber = new \\GuzzleHttp\\Subscriber\\Cookie($cookieJar);\r\n\t$emitter->attach($subscriber);\r\n\r\n    $response = $client->post($url,array(\r\n      \t\t'cookies' => $cookieJar,\r\n            'body'   => $user,\r\n            'headers' => ['Content-Type' => 'application/x-www-form-urlencoded']\r\n        )\r\n    );\r\n\r\n\r\n\tprint_r($cookieJar->toArray());exit;"}}