HTTPClient get $params array and oEmbedHelper uses it
This commit is contained in:
@@ -177,8 +177,17 @@ class HTTPClient extends HTTP_Request2
|
||||
/**
|
||||
* Quick static function to GET a URL
|
||||
*/
|
||||
public static function quickGet($url, $accept=null)
|
||||
public static function quickGet($url, $accept=null, $params=array())
|
||||
{
|
||||
if (!empty($params)) {
|
||||
$params = http_build_query($params, null, '&');
|
||||
if (strpos($url, '?') === false) {
|
||||
$url .= '?' . $params;
|
||||
} else {
|
||||
$url .= '&' . $params;
|
||||
}
|
||||
}
|
||||
|
||||
$client = new HTTPClient();
|
||||
if (!is_null($accept)) {
|
||||
$client->setHeader('Accept', $accept);
|
||||
|
Reference in New Issue
Block a user