TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
HTTP_Request2_Adapter Class Reference
Inheritance diagram for HTTP_Request2_Adapter:
HTTP_Request2_Adapter_Curl HTTP_Request2_Adapter_Mock HTTP_Request2_Adapter_Socket

Public Member Functions

 sendRequest (HTTP_Request2 $request)
 

Protected Member Functions

 calculateRequestLength (&$headers)
 

Protected Attributes

 $request
 
 $requestBody
 
 $contentLength
 

Static Protected Attributes

static $bodyDisallowed = array('TRACE')
 
static $bodyRequired = array('POST', 'PUT')
 

Detailed Description

Definition at line 40 of file Adapter.php.

Member Function Documentation

calculateRequestLength ( $headers)
protected

Calculates length of the request body, adds proper headers

Parameters
array&$headersassociative array of request headers, this method will add proper 'Content-Length' and 'Content-Type' headers to this array (or remove them if not needed)

Definition at line 96 of file Adapter.php.

References $contentLength, and elseif.

Referenced by HTTP_Request2_Adapter_Curl\createCurlHandle(), and HTTP_Request2_Adapter_Socket\prepareHeaders().

sendRequest ( HTTP_Request2  $request)
abstract

Sends request to the remote server and returns its response

Parameters
HTTP_Request2$requestHTTP request message
Returns
HTTP_Request2_Response
Exceptions
HTTP_Request2_Exception

Member Data Documentation

$bodyDisallowed = array('TRACE')
staticprotected

Definition at line 46 of file Adapter.php.

$bodyRequired = array('POST', 'PUT')
staticprotected

Definition at line 58 of file Adapter.php.

$contentLength
protected

Definition at line 77 of file Adapter.php.

Referenced by calculateRequestLength().

$request
protected
$requestBody
protected

Definition at line 71 of file Adapter.php.

Referenced by HTTP_Request2_Adapter_Curl\workaroundPhpBug47204().