\Google_Http_REST

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

Summary

Methods
Properties
Constants
execute()
doExecute()
decodeHttpResponse()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
decodeBody()
determineExpectedClass()
getResponseErrors()
isAltMedia()
No private properties found
N/A

Methods

execute()

execute(\Google_Client  $client, \Psr\Http\Message\RequestInterface  $request,   $expectedClass = null,   $config = array(),   $retryMap = null) : array

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

Parameters

\Google_Client $client
\Psr\Http\Message\RequestInterface $request
$expectedClass
$config
$retryMap

Throws

\Google_Service_Exception

on server side error (ie: not authenticated, invalid or malformed post body, invalid url)

Returns

array —

decoded result

doExecute()

doExecute(\Google_Client  $client, \Psr\Http\Message\RequestInterface  $request,   $expectedClass = null) : array

Executes a Psr\Http\Message\RequestInterface

Parameters

\Google_Client $client
\Psr\Http\Message\RequestInterface $request
$expectedClass

Throws

\Google_Service_Exception

on server side error (ie: not authenticated, invalid or malformed post body, invalid url)

Returns

array —

decoded result

decodeHttpResponse()

decodeHttpResponse(\Psr\Http\Message\ResponseInterface  $response, \Psr\Http\Message\RequestInterface  $request = null,   $expectedClass = null) : mixed|null

Decode an HTTP Response.

Parameters

\Psr\Http\Message\ResponseInterface $response
\Psr\Http\Message\RequestInterface $request
$expectedClass

Throws

\Google_Service_Exception

Returns

mixed|null

decodeBody()

decodeBody(\Psr\Http\Message\ResponseInterface  $response, \Psr\Http\Message\RequestInterface  $request = null) 

Parameters

\Psr\Http\Message\ResponseInterface $response
\Psr\Http\Message\RequestInterface $request

determineExpectedClass()

determineExpectedClass(  $expectedClass, \Psr\Http\Message\RequestInterface  $request = null) 

Parameters

$expectedClass
\Psr\Http\Message\RequestInterface $request

getResponseErrors()

getResponseErrors(  $body) 

Parameters

$body

isAltMedia()

isAltMedia(\Psr\Http\Message\RequestInterface  $request = null) 

Parameters

\Psr\Http\Message\RequestInterface $request