add clear
This commit is contained in:
+5
-1
@@ -28,6 +28,10 @@ class Http
|
||||
return $this->curl($url, $pushType, $data, $callback, $isSSL);
|
||||
}
|
||||
|
||||
if (function_exists('getIsCli') && getIsCli()) {
|
||||
return $this->coroutine($url, $pushType, $data, $callback, $isSSL);
|
||||
}
|
||||
|
||||
$url = 'https://' . $this->url . '/' . $url;
|
||||
|
||||
return $this->curl($url, $pushType, $data, $callback, $isSSL);
|
||||
@@ -37,9 +41,9 @@ class Http
|
||||
* @param $url
|
||||
* @param string $type
|
||||
* @param array $data
|
||||
* @throws
|
||||
* @return Result
|
||||
* 使用swoole协程方式请求
|
||||
* @throws
|
||||
*/
|
||||
private function coroutine($url, $type = 'get', $data = [], callable $callback = NULL, $isSSL = FALSE)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user