add clear

This commit is contained in:
2020-05-27 16:30:12 +08:00
parent 74d55943cf
commit 6539c988e8
-3
View File
@@ -546,12 +546,9 @@ class HttpClient
*/ */
private function toRequest($data) private function toRequest($data)
{ {
if (!is_array($data)) {
$data = Help::toArray($data);
if (is_string($data)) { if (is_string($data)) {
return $data; return $data;
} }
}
$contentType = 'application/x-www-form-urlencoded'; $contentType = 'application/x-www-form-urlencoded';
if (isset($this->header['Content-Type'])) { if (isset($this->header['Content-Type'])) {