@@ -39,8 +39,8 @@ discard block |
||
39 | 39 | private $requestHeaders; |
40 | 40 | |
41 | 41 | /** |
42 | - * @param int $statusCode |
|
43 | - * @param string $responseBody |
|
42 | + * @param string $requestMethod |
|
43 | + * @param string $requestBody |
|
44 | 44 | */ |
45 | 45 | public function __construct($requestMethod, $requestUri, array $requestHeaders = [], $requestBody = null) |
46 | 46 | { |
@@ -87,6 +87,10 @@ discard block |
||
87 | 87 | ); |
88 | 88 | } |
89 | 89 | |
90 | + /** |
|
91 | + * @param string $key |
|
92 | + * @param string $value |
|
93 | + */ |
|
90 | 94 | public function setHeader($key, $value) |
91 | 95 | { |
92 | 96 | $this->requestHeaders[$key] = $value; |
@@ -73,7 +73,7 @@ |
||
73 | 73 | CURLOPT_HTTPHEADER => [], |
74 | 74 | CURLOPT_FOLLOWLOCATION => false, |
75 | 75 | CURLOPT_PROTOCOLS => $this->httpsOnly ? CURLPROTO_HTTPS : CURLPROTO_HTTPS | CURLPROTO_HTTP, |
76 | - CURLOPT_HEADERFUNCTION => function ($curlChannel, $headerData) use (&$headerList) { |
|
76 | + CURLOPT_HEADERFUNCTION => function($curlChannel, $headerData) use (&$headerList) { |
|
77 | 77 | if (false !== strpos($headerData, ':')) { |
78 | 78 | list($key, $value) = explode(':', $headerData, 2); |
79 | 79 | $headerList[trim($key)] = trim($value); |