add clear
This commit is contained in:
@@ -465,10 +465,12 @@ class HttpClient
|
|||||||
}
|
}
|
||||||
echo $url . PHP_EOL;
|
echo $url . PHP_EOL;
|
||||||
if ($this->method != self::GET) {
|
if ($this->method != self::GET) {
|
||||||
var_dump($this->_data, $data);
|
|
||||||
if (!empty($this->_data)) {
|
if (!empty($this->_data)) {
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_data);
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_data);
|
||||||
} else {
|
} else {
|
||||||
|
if (is_array($data)) {
|
||||||
|
$data = http_build_query($data);
|
||||||
|
}
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user