Properties

$uri

$uri : string|\Horde_Url

Default URI if not specified for individual requests.

Type

string|\Horde_Url

$headers

$headers : array

Hash with additional request headers.

Type

array

$method

$method : string

Default request method if not specified for individual requests.

Type

string

$data

$data : array|string

POST data fields or POST/PUT data body.

Type

array|string

$username

$username : string

Authentication user name.

Type

string

$password

$password : string

Authentication password.

Type

string

$authenticationScheme

$authenticationScheme : string

Authentication method, one of the HordeHttp::AUTH* constants.

Type

string

$proxyServer

$proxyServer : string

Host name of a proxy server.

Type

string

$proxyPort

$proxyPort : integer

Port number of a proxy server.

Type

integer

$proxyType

$proxyType : integer

Proxy server type, one of the HordeHttp::PROXY* constants.

Type

integer

$proxyUsername

$proxyUsername : string

Proxy authentication user name.

Type

string

$proxyPassword

$proxyPassword : string

Proxy authentication password.

Type

string

$proxyAuthenticationScheme

$proxyAuthenticationScheme : string

Proxy authentication method, one of the HordeHttp::AUTH* constants.

Type

string

$redirects

$redirects : integer

Maximum number of redirects to follow.

Type

integer

$timeout

$timeout : integer

Timeout in seconds.

Type

integer

$userAgent

$userAgent : string

User-Agent: request header contents.

Type

string

$verifyPeer

$verifyPeer : boolean

Verify SSL peer certificates?

Type

boolean

$_headers

$_headers : array

Request headers

Type

array

$_options

$_options : array

Type

array

$_httpAuthSchemes

$_httpAuthSchemes : array

Map of HTTP authentication schemes from Horde_Http constants to HTTP_AUTH constants.

Type

array

Methods

__construct()

__construct(  $args = array()) 

Constructor

Parameters

$args

Throws

\Horde_Http_Exception

setOptions()

setOptions(  $options = array()) 

Parameters

$options

getDefaultOptions()

getDefaultOptions() 

send()

send() : \Horde_Http_Response_Base

Send this HTTP request

Throws

\Horde_Http_Exception

Returns

\Horde_Http_Response_Base

__get()

__get(string  $name) : mixed

Get an adapter parameter

Parameters

string $name

The parameter to get.

Returns

mixed —

Parameter value.

__set()

__set(string  $name, mixed  $value) 

Set a request parameter

Parameters

string $name

The parameter to set.

mixed $value

Parameter value.

setHeaders()

setHeaders(mixed  $headers, string  $value = null) 

Set one or more headers

Parameters

mixed $headers

A hash of header + value pairs, or a single header name

string $value

A header value

getHeader()

getHeader(string  $header) : string

Get the current value of $header

Parameters

string $header

Header name to get

Returns

string —

$header's current value

_httpAuthScheme()

_httpAuthScheme(  $httpAuthScheme) : \const

Translate a Horde_Http::AUTH_* constant to CURLAUTH_*

Parameters

$httpAuthScheme

Throws

\Horde_Http_Exception

Returns

\const