Commit feeab408 authored by 王源's avatar 王源
Browse files

调整超时时间

parent 32696c91
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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]);
    }