Public Member Functions | |
__construct ($uri=null, $config=null) | |
request ($method=null) | |
setUrlEncodeBody ($flag) | |
Protected Member Functions | |
_trySetCurlAdapter () | |
prepare_body () | |
Protected Attributes | |
$_urlEncodeBody = true |
Definition at line 34 of file Client.php.
__construct | ( | $ | uri = null , |
|
$ | config = null | |||
) |
Definition at line 38 of file Client.php.
00039 { 00040 $this->config['useragent'] = 'Varien_Http_Client'; 00041 00042 parent::__construct($uri, $config); 00043 }
_trySetCurlAdapter | ( | ) | [protected] |
Definition at line 45 of file Client.php.
00046 { 00047 if (extension_loaded('curl')) { 00048 $this->setAdapter(new Varien_Http_Adapter_Curl()); 00049 } 00050 return $this; 00051 }
prepare_body | ( | ) | [protected] |
Definition at line 65 of file Client.php.
00066 { 00067 $body = parent::prepare_body(); 00068 00069 if (!$this->_urlEncodeBody && $body) { 00070 $body = urldecode($body); 00071 $this->setHeaders('Content-length', strlen($body)); 00072 } 00073 00074 return $body; 00075 }
request | ( | $ | method = null |
) |
Definition at line 53 of file Client.php.
00054 { 00055 $this->_trySetCurlAdapter(); 00056 return parent::request($method); 00057 }
setUrlEncodeBody | ( | $ | flag | ) |
$_urlEncodeBody = true [protected] |
Definition at line 36 of file Client.php.