Documentation

Request
in package

An object containing all the details of the request made, including the host, path, port, params, and headers. Generally this object can be accessed as part of an API response, and can be used to debug the API call made.

Table of Contents

$bearerToken  : string|null
The bearer token used to authenticate the API call.
$body  : string|null
The body to send to the API endpoint.
$clientVersion  : string|null
The version of the SDK used.
$headers  : array<string|int, mixed>
The headers for this request.
$host  : string
The host domain to use for API calls.
$languageVersion  : string|null
The version of PHP used.
$params  : array<string|int, mixed>|null
The params to send to the API endpoint.
$path  : string
The path use for API calls.
$port  : int
The port to use for this request.
$scheme  : string
The scheme to use for API calls.
$ssl  : bool
Whether this connection uses SSL.
$sslCertificate  : string|null
The SSL certificate to use for this request.
$uri  : string
The full URI for this request, based on the verb, port, path, host, etc.
$verb  : string
The HTTPClient verb to use for API calls.
__construct()  : mixed
__toString()  : string
getBearerToken()  : string|null
getBody()  : string|null
getClientVersion()  : string|null
getHeaders()  : array<string|int, mixed>
getHost()  : string
getLanguageVersion()  : string|null
getParams()  : array<string|int, mixed>|null
getPath()  : string
getPort()  : int
getScheme()  : string
getSslCertificate()  : string|null
getUri()  : string
getVerb()  : string
isSsl()  : bool
determineScheme()  : void
Determines the scheme based on the SSL value
prepareHeaders()  : void
Prepares the headers to be sent in the request
prepareUrl()  : void
Prepares the full URL based on the scheme, host, port and path.

Properties

$bearerToken

The bearer token used to authenticate the API call.

private string|null $bearerToken

$body

The body to send to the API endpoint.

private string|null $body

$clientVersion

The version of the SDK used.

private string|null $clientVersion

$headers

The headers for this request.

private array<string|int, mixed> $headers

$host

The host domain to use for API calls.

private string $host

$languageVersion

The version of PHP used.

private string|null $languageVersion

$params

The params to send to the API endpoint.

private array<string|int, mixed>|null $params

$path

The path use for API calls.

private string $path

$port

The port to use for this request.

private int $port

$scheme

The scheme to use for API calls.

private string $scheme

$ssl

Whether this connection uses SSL.

private bool $ssl

$sslCertificate

The SSL certificate to use for this request.

private string|null $sslCertificate

$uri

The full URI for this request, based on the verb, port, path, host, etc.

private string $uri

$verb

The HTTPClient verb to use for API calls.

private string $verb

Methods

__construct()

public __construct(string $verb, string $path, array<string|int, mixed>|null $params, string|null $body, string|null $bearerToken, HTTPClient $client) : mixed
Parameters
$verb : string
$path : string
$params : array<string|int, mixed>|null
$body : string|null
$bearerToken : string|null
$client : HTTPClient
Return values
mixed

__toString()

public __toString() : string
Return values
string

getBearerToken()

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

getBody()

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

getClientVersion()

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

getHeaders()

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

getHost()

public getHost() : string
Return values
string

getLanguageVersion()

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

getParams()

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

getPath()

public getPath() : string
Return values
string

getPort()

public getPort() : int
Return values
int

getScheme()

public getScheme() : string
Return values
string

getSslCertificate()

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

getUri()

public getUri() : string
Return values
string

getVerb()

public getVerb() : string
Return values
string

isSsl()

public isSsl() : bool
Return values
bool

determineScheme()

Determines the scheme based on the SSL value

private determineScheme() : void
Return values
void

prepareHeaders()

Prepares the headers to be sent in the request

private prepareHeaders() : void
Return values
void

prepareUrl()

Prepares the full URL based on the scheme, host, port and path.

private prepareUrl() : void
Return values
void

Search results