From 1b9b6c4af68003b6efbcb383e67e69e16cf9955e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 27 May 2020 16:17:21 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index c0b1290..eee966d 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -213,7 +213,7 @@ class HttpClient */ 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) { - $this->header[strtoupper($key)] = $value; + $this->header[$key] = $value; } /** @@ -504,9 +504,6 @@ class HttpClient if (!empty($this->header)) { $client->setHeaders($this->header); } - - var_dump($this->header); - $client->setMethod(strtoupper($this->method)); if (strtolower($this->method) == self::GET && !empty($data)) { $url .= '?' . $data; @@ -950,7 +947,7 @@ class HttpClient return []; } foreach ($headers as $key => $val) { - $this->header[strtoupper($key)] = $val; + $this->header[$key] = $val; } return $this->header; }