summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Gass2017-09-25 18:26:16 +0200
committerNathan Gass2017-09-25 18:26:16 +0200
commit7409e20cdc51ef574759450ef92dd7594a1ec1b9 (patch)
tree9012540bb88a4ca793aea2ade5b7acedef2a981d
parent11b1601297febd522611bec1dc448bf9e670a494 (diff)
downloaditools-7409e20cdc51ef574759450ef92dd7594a1ec1b9.tar.gz
itools-7409e20cdc51ef574759450ef92dd7594a1ec1b9.tar.bz2
itools-7409e20cdc51ef574759450ef92dd7594a1ec1b9.zip
rename request_curl to request
-rw-r--r--it_url.class9
1 files changed, 2 insertions, 7 deletions
diff --git a/it_url.class b/it_url.class
index 05cd9f2..e4617a9 100644
--- a/it_url.class
+++ b/it_url.class
@@ -127,7 +127,7 @@ function get($p=null, $timeout=5)
else # called statically
$url = new it_url($p['url']);
- $result = $url->request_curl($p);
+ $result = $url->request($p);
# Handle redirects (supports relative and global) but not for HTTP 201 Created because that can send the Location of the new resource
if ($url->headers['Location'] && $url->result != 201 && preg_match('#^(https?://[^/]*)?(/)?(.*)$#i', $url->headers['Location'], $parts) && ($parts[1] != $url->url))
@@ -177,11 +177,6 @@ static function _default_headers($url, $p)
return $headers;
}
-function request($p=array())
-{
- return $this->request_curl($p);
-}
-
static function curl_opts($p=array())
{
$p += array('totaltimeout' => "999999", 'timeout' => 5);
@@ -239,7 +234,7 @@ static function curl_opts($p=array())
* @param $p['method'] different HTTP method
*/
-function request_curl($p=array())
+function request($p=array())
{
$url = $this;
if ($p['url'])