add clear
This commit is contained in:
@@ -416,8 +416,12 @@ class HttpClient
|
|||||||
curl_setopt($ch, CURLOPT_POST, 1);
|
curl_setopt($ch, CURLOPT_POST, 1);
|
||||||
}
|
}
|
||||||
if ($this->method != self::GET) {
|
if ($this->method != self::GET) {
|
||||||
|
if (!empty($this->_data)) {
|
||||||
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_data);
|
||||||
|
} else {
|
||||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($this->method));
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($this->method));
|
||||||
$output = curl_exec($ch);
|
$output = curl_exec($ch);
|
||||||
|
|||||||
Reference in New Issue
Block a user