class REST (View source)

This class implements the RESTful transport of apiServiceRequest()'s

Methods

static mixed|T|null
execute(ClientInterface $client, RequestInterface $request, T>|false|null $expectedClass = null, array $config = [], array $retryMap = null)

Executes a Psr\Http\Message\RequestInterface and (if applicable) automatically retries when errors occur.

static mixed|T|null
doExecute(ClientInterface $client, RequestInterface $request, T>|false|null $expectedClass = null)

Executes a Psr\Http\Message\RequestInterface

static mixed|T|null
decodeHttpResponse(ResponseInterface $response, RequestInterface|null $request = null, T>|false|null $expectedClass = null)

Decode an HTTP Response.

Details

static mixed|T|null execute(ClientInterface $client, RequestInterface $request, T>|false|null $expectedClass = null, array $config = [], array $retryMap = null)

Executes a Psr\Http\Message\RequestInterface and (if applicable) automatically retries when errors occur.

Parameters

ClientInterface $client
RequestInterface $request
T>|false|null $expectedClass
array $config
array $retryMap

Return Value

mixed|T|null

Exceptions

Exception

static mixed|T|null doExecute(ClientInterface $client, RequestInterface $request, T>|false|null $expectedClass = null)

Executes a Psr\Http\Message\RequestInterface

Parameters

ClientInterface $client
RequestInterface $request
T>|false|null $expectedClass

Return Value

mixed|T|null

Exceptions

Exception

static mixed|T|null decodeHttpResponse(ResponseInterface $response, RequestInterface|null $request = null, T>|false|null $expectedClass = null)

Decode an HTTP Response.

Parameters

ResponseInterface $response

The http response to be decoded.

RequestInterface|null $request
T>|false|null $expectedClass

Return Value

mixed|T|null

Exceptions

Exception