class REST (View source)

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

Methods

static array
execute(ClientInterface $client, RequestInterface $request, string $expectedClass = null, array $config = array(), array $retryMap = null)

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

static array
doExecute(ClientInterface $client, RequestInterface $request, string $expectedClass = null)

Executes a Psr\Http\Message\RequestInterface

static mixed|null
decodeHttpResponse(ResponseInterface $response, RequestInterface $request = null, string $expectedClass = null)

Decode an HTTP Response.

Details

static array execute(ClientInterface $client, RequestInterface $request, string $expectedClass = null, array $config = array(), array $retryMap = null)

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

Parameters

ClientInterface $client
RequestInterface $request
string $expectedClass
array $config
array $retryMap

Return Value

array

decoded result

Exceptions

Exception

static array doExecute(ClientInterface $client, RequestInterface $request, string $expectedClass = null)

Executes a Psr\Http\Message\RequestInterface

Parameters

ClientInterface $client
RequestInterface $request
string $expectedClass

Return Value

array

decoded result

Exceptions

Exception

static mixed|null decodeHttpResponse(ResponseInterface $response, RequestInterface $request = null, string $expectedClass = null)

Decode an HTTP Response.

Parameters

ResponseInterface $response

The http response to be decoded.

RequestInterface $request
string $expectedClass

Return Value

mixed|null

Exceptions

Exception