add clear

This commit is contained in:
as2252258@163.com
2019-07-12 18:44:54 +08:00
parent c6e9b9a34d
commit cac575718b
+5 -1
View File
@@ -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)
{