Commit 471681c7 authored by mengweifu's avatar mengweifu

update: HttpUtil

parent bdc3d20f
...@@ -32,9 +32,10 @@ class HttpUtil ...@@ -32,9 +32,10 @@ class HttpUtil
{ {
return self::CURL($url, $timeout, $retries, $headers, false, $proxy, 'HEAD'); return self::CURL($url, $timeout, $retries, $headers, false, $proxy, 'HEAD');
} }
static function GET($url, $timeout = 10000, $retries = 1, $headers = false, $proxy = false, $curl_opts = array()) static function GET($url, $params, $timeout = 10000, $retries = 1, $headers = false, $proxy = false, $curl_opts = array())
{ {
return self::CURL($url, $timeout, $retries, $headers, false, $proxy, 'GET', $curl_opts); $url = $url ."?". http_build_query($params);
return self::CURL($url, $timeout, $retries, $headers, [], $proxy, 'GET', $curl_opts);
} }
static function PUT($url, $post, $timeout = 10000, $retries = 1, $headers = false, $proxy = false) static function PUT($url, $post, $timeout = 10000, $retries = 1, $headers = false, $proxy = false)
......
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