ParseHttpable

Extends

Class ParseHttpable - Interface for an HTTPable client

author

Ben Friedman friedman.benjamin@gmail.com

package

Parse\HttpClients

Methods

Adds a header to this request

addRequestHeader(string $key, string $value) 

Arguments

$key

string

Header name

$value

string

Header value

Gets the error code

getErrorCode() : integer

Response

integer

Gets the error message

getErrorMessage() : string

Response

string

Returns the content type of the response

getResponseContentType() : null|string

Response

null|string

Gets headers in the response

getResponseHeaders() : array

Response

array

Returns the status code of the response

getResponseStatusCode() : integer

Response

integer

Sends an HTTP request

send(string $url, string $method = 'GET', array $data = array()) : string

Arguments

$url

string

Url to send this request to

$method

string

Method to send this request via

$data

array

Data to send in this request

Response

string

Sets the CA file to validate requests with

setCAFile(string $caFile) 

Arguments

$caFile

string

CA file to set

Sets the connection timeout

setConnectionTimeout(integer $timeout) 

Arguments

$timeout

integer

Timeout to set

Sets the request timeout

setTimeout(integer $timeout) 

Arguments

$timeout

integer

Sets the timeout for the request

Sets up our client before we make a request

setup()