Commit feeab408 authored by 王源's avatar 王源 🎧

调整超时时间

parent 32696c91
......@@ -27,7 +27,7 @@ class HttpRequestJson
*/
public static function get($url, $httpHeaders = [])
{
$client = new Client();
$client = new Client(['timeout' => 30]);
return $client->get($url, ['headers' => $httpHeaders]);
}
......@@ -40,7 +40,7 @@ class HttpRequestJson
*/
public static function post($url, $dataArray, $httpHeaders = [])
{
$client = new Client();
$client = new Client(['timeout' => 30]);
return $client->post($url, ['headers' => $httpHeaders, 'json' => $dataArray]);
}
......@@ -53,7 +53,7 @@ class HttpRequestJson
*/
public static function put($url, $dataArray, $httpHeaders = [])
{
$client = new Client();
$client = new Client(['timeout' => 30]);
return $client->put($url, ['headers' => $httpHeaders, 'json' => $dataArray]);
}
......@@ -65,7 +65,7 @@ class HttpRequestJson
*/
public static function delete($url, $httpHeaders = [])
{
$client = new Client();
$client = new Client(['timeout' => 30]);
return $client->delete($url, ['headers' => $httpHeaders]);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment