Methods

getUrl()

getUrl() : string

Get the URL

Returns

string

getMethod()

getMethod() : string

Get the method

Returns

string

setField()

setField(string  $name, mixed  $value) : \Pop\Http\Client\ClientInterface

Set a field

Parameters

string $name
mixed $value

Returns

\Pop\Http\Client\ClientInterface

getField()

getField(string  $name) : mixed

Get a field

Parameters

string $name

Returns

mixed

getFields()

getFields() : array

Get all field

Returns

array

prepareQuery()

prepareQuery() : string

Prepare the HTTP query

Returns

string

getQuery()

getQuery() : string

Get HTTP query

Returns

string

getQueryLength()

getQueryLength(boolean  $mb = true) : integer

Get HTTP query length

Parameters

boolean $mb

Returns

integer

setRequestHeader()

setRequestHeader(string  $name, string  $value) : \Pop\Http\Client\ClientInterface

Set a request header

Parameters

string $name
string $value

Returns

\Pop\Http\Client\ClientInterface

setRequestHeaders()

setRequestHeaders(array  $headers) : \Pop\Http\Client\ClientInterface

Set all request headers

Parameters

array $headers

Returns

\Pop\Http\Client\ClientInterface

getRequestHeader()

getRequestHeader(string  $name) : mixed

Get a request header

Parameters

string $name

Returns

mixed

getRequestHeaders()

getRequestHeaders() : array

Get all request headers

Returns

array

hasRequestHeaders()

hasRequestHeaders() : boolean

Determine if there are request headers

Returns

boolean

getResponseHeader()

getResponseHeader(string  $name) : mixed

Get a response header

Parameters

string $name

Returns

mixed

getResponseHeaders()

getResponseHeaders() : array

Get all response headers

Returns

array

hasResponseHeaders()

hasResponseHeaders() : boolean

Determine if there are response headers

Returns

boolean

getRawResponseHeader()

getRawResponseHeader() : string

Get raw response header

Returns

string

getBody()

getBody() : string

Get the response body

Returns

string

getCode()

getCode() : string

Get the response code

Returns

string

getHttpVersion()

getHttpVersion() : string

Get the response HTTP version

Returns

string

getMessage()

getMessage() : string

Get the response HTTP message

Returns

string

getResponse()

getResponse() : string

Get the raw response

Returns

string

hasResource()

hasResource() : boolean

Determine whether or not resource is available

Returns

boolean

getResource()

getResource() : resource

Get the resource

Returns

resource

decodeBody()

decodeBody() : resource

Decode the body

Returns

resource

throwError()

throwError(string  $error) : void

Throw an exception upon an error.

Parameters

string $error

Throws

\Pop\Http\Client\Exception

send()

send() : void

Method to send the request and get the response