Varien_Http_Client Class Reference

List of all members.

Public Member Functions

 __construct ($uri=null, $config=null)
 request ($method=null)
 setUrlEncodeBody ($flag)

Protected Member Functions

 _trySetCurlAdapter ()
 prepare_body ()

Protected Attributes

 $_urlEncodeBody = true


Detailed Description

Definition at line 34 of file Client.php.


Constructor & Destructor Documentation

__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     }


Member Function Documentation

_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  ) 

Definition at line 59 of file Client.php.

00060     {
00061         $this->_urlEncodeBody = $flag;
00062         return $this;
00063     }


Member Data Documentation

$_urlEncodeBody = true [protected]

Definition at line 36 of file Client.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:25:03 2009 for Magento by  doxygen 1.5.8