Documentation

Request

REST API HTTP Client Request class.

Table of Contents

$body  : string
Request body.
$headers  : array<string|int, mixed>
Request headers.
$method  : string
Request method.
$parameters  : array<string|int, mixed>
Request paramenters.
$url  : string
Request url.
__construct()  : mixed
Initialize request.
getBody()  : string
Get body.
getHeaders()  : array<string|int, mixed>
Get headers.
getMethod()  : string
Get method.
getParameters()  : array<string|int, mixed>
Get parameters.
getRawHeaders()  : array<string|int, mixed>
Get raw headers.
getUrl()  : string
Get url.
setBody()  : mixed
Set body.
setHeaders()  : mixed
Set headers.
setMethod()  : mixed
Set method.
setParameters()  : mixed
Set parameters.
setUrl()  : mixed
Set url.

Properties

$body

Request body.

private string $body

$headers

Request headers.

private array<string|int, mixed> $headers

$method

Request method.

private string $method

$parameters

Request paramenters.

private array<string|int, mixed> $parameters

$url

Request url.

private string $url

Methods

__construct()

Initialize request.

public __construct([string $url = '' ][, string $method = 'POST' ][, array<string|int, mixed> $parameters = [] ][, array<string|int, mixed> $headers = [] ][, string $body = '' ]) : mixed
Parameters
$url : string = ''

Request url.

$method : string = 'POST'

Request method.

$parameters : array<string|int, mixed> = []

Request paramenters.

$headers : array<string|int, mixed> = []

Request headers.

$body : string = ''

Request body.

Return values
mixed

getBody()

Get body.

public getBody() : string
Return values
string

getHeaders()

Get headers.

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

getMethod()

Get method.

public getMethod() : string
Return values
string

getParameters()

Get parameters.

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

getRawHeaders()

Get raw headers.

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

getUrl()

Get url.

public getUrl() : string
Return values
string

setBody()

Set body.

public setBody(string $body) : mixed
Parameters
$body : string

Request body.

Return values
mixed

setHeaders()

Set headers.

public setHeaders(array<string|int, mixed> $headers) : mixed
Parameters
$headers : array<string|int, mixed>

Request headers.

Return values
mixed

setMethod()

Set method.

public setMethod(string $method) : mixed
Parameters
$method : string

Request method.

Return values
mixed

setParameters()

Set parameters.

public setParameters(array<string|int, mixed> $parameters) : mixed
Parameters
$parameters : array<string|int, mixed>

Request paramenters.

Return values
mixed

setUrl()

Set url.

public setUrl(string $url) : mixed
Parameters
$url : string

Request url.

Return values
mixed

Search results