spunQ_HttpBrowserRequest Class Reference

A http request to be sent. More...

List of all members.

Public Member Functions

 __construct ($uri=NULL)
 Constructor.
 setAuthentication ($username, $password)
 setPostData ($postData)
 Adds POST data to the request and sets the necessary curl options.
 setSizeLimit ($limit)
 Sets a size limit to the downloeded file.
 send ($verifyResponse=true)
 Sends this request and returns the response.

Protected Attributes

 $curlHandle
 The curl resource handle for this request.
 $uri
 Uri to connect to.
 $postData
 Post data to send.


Detailed Description

A http request to be sent.

This class uses curl internally.

Definition at line 7 of file HttpBrowserRequest.class.php.


Constructor & Destructor Documentation

spunQ_HttpBrowserRequest::__construct ( uri = NULL  ) 

Constructor.

Parameters:
$uri The uri to create this request for.

Definition at line 31 of file HttpBrowserRequest.class.php.


Member Function Documentation

spunQ_HttpBrowserRequest::send ( verifyResponse = true  ) 

Sends this request and returns the response.

Returns:
spunQ_HttpBrowserResponse
Parameters:
$verifyResponse Whether an exception should be thrown if the server response indicates in error in the communication. Errors are HTTP status codes like 404 or 403 or 500.
Exceptions:
spunQ_IOException 

Definition at line 78 of file HttpBrowserRequest.class.php.

spunQ_HttpBrowserRequest::setPostData ( postData  ) 

Adds POST data to the request and sets the necessary curl options.

Returns:
spunQ_HttpBrowserRequest $this

Definition at line 49 of file HttpBrowserRequest.class.php.

spunQ_HttpBrowserRequest::setSizeLimit ( limit  ) 

Sets a size limit to the downloeded file.

Parameters:
$limit A value accepted by spunQ::parseMemoryLimit().
Returns:
spunQ_HttpBrowserRequest $this

Definition at line 65 of file HttpBrowserRequest.class.php.


Member Data Documentation

spunQ_HttpBrowserRequest::$curlHandle [protected]

The curl resource handle for this request.

Type:
resource

Definition at line 13 of file HttpBrowserRequest.class.php.

spunQ_HttpBrowserRequest::$postData [protected]

Post data to send.

May be a string (for raw post data) or an array (for key/value pairs).

Definition at line 25 of file HttpBrowserRequest.class.php.

spunQ_HttpBrowserRequest::$uri [protected]

Uri to connect to.

Type:
string

Definition at line 19 of file HttpBrowserRequest.class.php.


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

Generated on Fri Jul 1 11:12:40 2011 for spunQ3 by  doxygen 1.5.9