合并分支 'akun' 到 'master'
Akun 查看合并请求 !428
正在显示
1 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -42,7 +42,7 @@ class HttpUtils | @@ -42,7 +42,7 @@ class HttpUtils | ||
| 42 | public static function get($url, $data, $headers = []) | 42 | public static function get($url, $data, $headers = []) |
| 43 | { | 43 | { |
| 44 | LogUtils::info("HttpUtils-GET请求URL:" . $url); | 44 | LogUtils::info("HttpUtils-GET请求URL:" . $url); |
| 45 | - $response = Http::withHeaders($headers)->get($url, $data); | 45 | + $response = Http::timeout(20)->withHeaders($headers)->get($url, $data); |
| 46 | self::checkSuccess($response); | 46 | self::checkSuccess($response); |
| 47 | return $response->getBody()->getContents(); | 47 | return $response->getBody()->getContents(); |
| 48 | } | 48 | } |
| @@ -50,7 +50,7 @@ class HttpUtils | @@ -50,7 +50,7 @@ class HttpUtils | ||
| 50 | public static function post($url, $data, $headers = []) | 50 | public static function post($url, $data, $headers = []) |
| 51 | { | 51 | { |
| 52 | LogUtils::info("HttpUtils-POST请求URL:" . $url); | 52 | LogUtils::info("HttpUtils-POST请求URL:" . $url); |
| 53 | - $response = Http::withHeaders($headers)->post($url, $data); | 53 | + $response = Http::timeout(20)->withHeaders($headers)->post($url, $data); |
| 54 | self::checkSuccess($response); | 54 | self::checkSuccess($response); |
| 55 | return $response->getBody()->getContents(); | 55 | return $response->getBody()->getContents(); |
| 56 | } | 56 | } |
-
请 注册 或 登录 后发表评论