We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc66aef commit 44469ecCopy full SHA for 44469ec
src/Curl/Curl.php
@@ -211,8 +211,10 @@ public function setBasicAuthentication($username, $password = '')
211
212
public function setHeader($key, $value)
213
{
214
- $this->headers[$key] = $key . ': ' . $value;
215
- $this->setOpt(CURLOPT_HTTPHEADER, array_values($this->headers));
+ $this->headers[$key] = $value;
+ $this->setOpt(CURLOPT_HTTPHEADER, array_map(function($value, $key) {
216
+ return $key . ': ' . $value;
217
+ }, $this->headers, array_keys($this->headers)));
218
}
219
220
public function unsetHeader($key)
0 commit comments