|
...
|
...
|
@@ -42,7 +42,7 @@ class HttpUtils |
|
|
|
public static function get($url, $data, $headers = [])
|
|
|
|
{
|
|
|
|
LogUtils::info("HttpUtils-GET请求URL:" . $url);
|
|
|
|
$response = Http::withHeaders($headers)->get($url, $data);
|
|
|
|
$response = Http::timeout(20)->withHeaders($headers)->get($url, $data);
|
|
|
|
self::checkSuccess($response);
|
|
|
|
return $response->getBody()->getContents();
|
|
|
|
}
|
|
...
|
...
|
@@ -50,7 +50,7 @@ class HttpUtils |
|
|
|
public static function post($url, $data, $headers = [])
|
|
|
|
{
|
|
|
|
LogUtils::info("HttpUtils-POST请求URL:" . $url);
|
|
|
|
$response = Http::withHeaders($headers)->post($url, $data);
|
|
|
|
$response = Http::timeout(20)->withHeaders($headers)->post($url, $data);
|
|
|
|
self::checkSuccess($response);
|
|
|
|
return $response->getBody()->getContents();
|
|
|
|
}
|
...
|
...
|
|