Parse PHP SDK API Reference

ParseHttpable

Class ParseHttpable - Interface for an HTTPable client

Tags
author

Ben Friedman [email protected]

Table of Contents

addRequestHeader()  : mixed
Adds a header to this request
getErrorCode()  : int
Gets the error code
getErrorMessage()  : string
Gets the error message
getResponseContentType()  : null|string
Returns the content type of the response
getResponseHeaders()  : array<string|int, mixed>
Gets headers in the response
getResponseStatusCode()  : int
Returns the status code of the response
send()  : string
Sends an HTTP request
setCAFile()  : mixed
Sets the CA file to validate requests with
setConnectionTimeout()  : mixed
Sets the connection timeout
setHttpOptions()  : mixed
Sets http options to pass to the http client
setTimeout()  : mixed
Sets the request timeout
setup()  : void
Sets up our client before we make a request

Methods

addRequestHeader()

Adds a header to this request

public addRequestHeader(string $key, string $value) : mixed
Parameters
$key : string

Header name

$value : string

Header value

Return values
mixed

getErrorCode()

Gets the error code

public getErrorCode() : int
Return values
int

getErrorMessage()

Gets the error message

public getErrorMessage() : string
Return values
string

getResponseContentType()

Returns the content type of the response

public getResponseContentType() : null|string
Return values
null|string

getResponseHeaders()

Gets headers in the response

public getResponseHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getResponseStatusCode()

Returns the status code of the response

public getResponseStatusCode() : int
Return values
int

send()

Sends an HTTP request

public send(string $url[, string $method = 'GET' ][, array<string|int, mixed> $data = array() ]) : string
Parameters
$url : string

Url to send this request to

$method : string = 'GET'

Method to send this request via

$data : array<string|int, mixed> = array()

Data to send in this request

Return values
string

setCAFile()

Sets the CA file to validate requests with

public setCAFile(string $caFile) : mixed
Parameters
$caFile : string

CA file to set

Return values
mixed

setConnectionTimeout()

Sets the connection timeout

public setConnectionTimeout(int $timeout) : mixed
Parameters
$timeout : int

Timeout to set

Return values
mixed

setHttpOptions()

Sets http options to pass to the http client

public setHttpOptions(string $httpOptions) : mixed
Parameters
$httpOptions : string

Options to set

Return values
mixed

setTimeout()

Sets the request timeout

public setTimeout(int $timeout) : mixed
Parameters
$timeout : int

Sets the timeout for the request

Return values
mixed

setup()

Sets up our client before we make a request

public setup() : void
Return values
void

Search results