\Pop\Http\ClientClientInterface

HTTP client interface

Summary

Methods
Constants
setUrl()
getUrl()
setField()
setFields()
getField()
getFields()
removeField()
getHeader()
getHeaders()
getRawHeader()
getBody()
getCode()
getHttpVersion()
getMessage()
getResponse()
hasResource()
getResource()
decodeBody()
send()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

getUrl()

getUrl() : string

Get the URL

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

getHeader()

getHeader(string  $name) : mixed

Get a response header

Parameters

string $name

Returns

mixed

getHeaders()

getHeaders() : array

Get all response headers

Returns

array

getRawHeader()

getRawHeader() : string

Get raw response header

Returns

string

getBody()

getBody() : string

Get the cURL response body

Returns

string

getCode()

getCode() : string

Get the cURL response code

Returns

string

getHttpVersion()

getHttpVersion() : string

Get the cURL response HTTP version

Returns

string

getMessage()

getMessage() : string

Get the cURL 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

send()

send() : void

Method to send the request and get the response