add clear
This commit is contained in:
@@ -213,7 +213,7 @@ class HttpClient
|
|||||||
*/
|
*/
|
||||||
public function setHeader($key, $value)
|
public function setHeader($key, $value)
|
||||||
{
|
{
|
||||||
$this->header[strtoupper($key)] = $value;
|
$this->header[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -222,7 +222,7 @@ class HttpClient
|
|||||||
*/
|
*/
|
||||||
public function addHeader($key, $value)
|
public function addHeader($key, $value)
|
||||||
{
|
{
|
||||||
$this->header[strtoupper($key)] = $value;
|
$this->header[$key] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -504,9 +504,6 @@ class HttpClient
|
|||||||
if (!empty($this->header)) {
|
if (!empty($this->header)) {
|
||||||
$client->setHeaders($this->header);
|
$client->setHeaders($this->header);
|
||||||
}
|
}
|
||||||
|
|
||||||
var_dump($this->header);
|
|
||||||
|
|
||||||
$client->setMethod(strtoupper($this->method));
|
$client->setMethod(strtoupper($this->method));
|
||||||
if (strtolower($this->method) == self::GET && !empty($data)) {
|
if (strtolower($this->method) == self::GET && !empty($data)) {
|
||||||
$url .= '?' . $data;
|
$url .= '?' . $data;
|
||||||
@@ -950,7 +947,7 @@ class HttpClient
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
foreach ($headers as $key => $val) {
|
foreach ($headers as $key => $val) {
|
||||||
$this->header[strtoupper($key)] = $val;
|
$this->header[$key] = $val;
|
||||||
}
|
}
|
||||||
return $this->header;
|
return $this->header;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user