PHP PSR

Client extends AbstractClient
in package

Simple Client Implementation.

Table of Contents

Properties

$connect_timeout  : int
$follow_location  : bool
$ssl_verification  : bool
$timeout  : int
$response  : ResponseInterface

Methods

__construct()  : mixed
sendRequest()  : Response
Sends a PSR-7 request and returns a PSR-7 response.
withConnectTimeout()  : static
Return an instance with the provided connect timeout.
withFollowLocation()  : static
Return an instance with the provided follow location.
withSslVerification()  : static
Return an instance with the provided ssl verification.
withTimeout()  : static
Return an instance with the provided timeout.
getRequestContent()  : string
Retrieve request content.
getRequestHeaders()  : array<string|int, string>
Retrieve request headers.

Properties

Methods

__construct()

public __construct([array<string, mixed> $Config = [] ]) : mixed
Parameters
$Config : array<string, mixed> = []

The configuration.

sendRequest()

Sends a PSR-7 request and returns a PSR-7 response.

public sendRequest(RequestInterface $request) : Response
Parameters
$request : RequestInterface
Tags
throws
ClientExceptionInterface

If an error happens while processing the request.

Return values
Response

withConnectTimeout()

Return an instance with the provided connect timeout.

public withConnectTimeout(int $ConnectTimeout) : static
Parameters
$ConnectTimeout : int
Return values
static

withFollowLocation()

Return an instance with the provided follow location.

public withFollowLocation(bool $FollowLocation) : static
Parameters
$FollowLocation : bool
Return values
static

withSslVerification()

Return an instance with the provided ssl verification.

public withSslVerification(bool $SslVerification) : static
Parameters
$SslVerification : bool
Return values
static

withTimeout()

Return an instance with the provided timeout.

public withTimeout(int $Timeout) : static
Parameters
$Timeout : int
Return values
static

getRequestContent()

Retrieve request content.

private getRequestContent(RequestInterface $request) : string
Parameters
$request : RequestInterface
Return values
string

getRequestHeaders()

Retrieve request headers.

private getRequestHeaders(RequestInterface $request) : array<string|int, string>
Parameters
$request : RequestInterface
Return values
array<string|int, string>

        
On this page

Search results