Zend_Http_Client is an implemetation of an HTTP client in PHP. The client
supports basic features like sending different HTTP requests and handling redirections, as well as more advanced features like proxy settings, HTTP authentication and cookie persistance (using a Zend_Http_CookieJar object)
Located in /Zend/Http/Client.php (line 43)
The adapter used to preform the actual connection to the server
HTTP Authentication settings
Expected to be an associative array with this structure: $this->auth = array('user' => 'username', 'password' => 'password', 'type' => 'basic') Where 'type' should be one of the supported authentication types (see the AUTH_* constants), for example 'basic' or 'digest'.
If null, no authentication will be used.
Configuration array, set using the constructor or using ::setConfig()
The client's cookie jar
Request body content type (for POST requests)
File upload arrays (used in POST requests)
An associative array, where each element is of the format: 'name' => array('filename.txt', 'text/plain', 'This is the actual file contents')
Associative array of request headers
The last HTTP request sent by the client, as string
The last HTTP response received by the client
HTTP request method
Associative array of GET parameters
Assiciative array of POST parameters
The raw post data to send. Could be set by setRawData($data, $enctype).
Redirection counter
Request URI
Create a HTTP authentication "Authorization:" header according to the specified user, password and authentication method.
Encode data to a multipart/form-data part suitable for a POST request.
Contructor method. Will create a new HTTP client. Accepts the target URL and optionally and array of headers.
Return the current cookie jar or null if none.
Get the value of a specific header
Note that if the header has more than one value, an array will be returned.
Get the last HTTP request as string
Get the last HTTP response received by this client
If $config['storeresponse'] is set to false, or no response was stored yet, will return null
Get the number of redirections done on the last request
Get the URI for the next request
Load the connection adapter
While this method is not called more than one for a client, it is seperated from ->request() to preserve logic and readability
Prepare the request body (for POST and PUT requests)
Prepare the request headers
Send the HTTP request and return an HTTP response object
Clear all GET and POST parameters
Should be used to reset the request parameters if the client is used for several concurrent requests.
Set HTTP authentication parameters
$type should be one of the supported types - see the self::AUTH_* constants.
To enable authentication:
To disable authentication:
Set configuration parameters for this HTTP client
Add a cookie to the request. If the client has no Cookie Jar, the cookies will be added directly to the headers array as "Cookie" headers.
Set the HTTP client's cookie jar.
A cookie jar is an object that holds and maintains cookies across HTTP requests and responses.
Set the encoding type for POST data
Set a file to upload (using a POST request)
Can be used in two ways:
Set one or more request headers
This function can be used in several ways to set the client's request headers:
Set the next request's method
Validated the passed method and sets it. If we have files set for POST requests, and the new method is not POST, the files are silently dropped.
Set a GET parameter for the request. Wrapper around _setParameter
Set a POST parameter for the request. Wrapper around _setParameter
Set the raw (already encoded) POST data.
This function is here for two reasons:
Helper method that gets a possibly multi-level parameters array (get or post) and flattens it.
The method returns an array of (key, value) pairs (because keys are not necessarily unique. If one of the parameters in as array, it will also add a [] suffix to the key.
Set a GET or POST parameter - used by SetParameterGet and SetParameterPost
Supported HTTP Authentication methods
POST data encoding methods
HTTP request methods
HTTP protocol versions
Documentation generated on Wed, 21 Feb 2007 11:46:13 -0800 by phpDocumentor 1.3.1