\Qcloud\CosSerializer

Override Request serializer to modify authentication mechanism

Summary

Methods
Properties
Constants
__construct()
__invoke()
No public properties found
No constants found
prepareRequest()
createRequest()
No protected properties found
N/A
createCommandWithUri()
$locations
$description
N/A

Properties

$locations

$locations : \GuzzleHttp\Command\Guzzle\RequestLocation\RequestLocationInterface[]

Type

RequestLocationInterface[]

$description

$description : \GuzzleHttp\Command\Guzzle\DescriptionInterface

Type

DescriptionInterface

Methods

__construct()

__construct(\GuzzleHttp\Command\Guzzle\DescriptionInterface  $description, array  $requestLocations = []) : mixed

Parameters

\GuzzleHttp\Command\Guzzle\DescriptionInterface $description
array $requestLocations

Extra request locations

Returns

mixed —

__invoke()

__invoke(\GuzzleHttp\Command\CommandInterface  $command) : \Psr\Http\Message\RequestInterface

Parameters

\GuzzleHttp\Command\CommandInterface $command

Returns

\Psr\Http\Message\RequestInterface —

prepareRequest()

prepareRequest(\GuzzleHttp\Command\CommandInterface  $command, \Psr\Http\Message\RequestInterface  $request) : \Psr\Http\Message\RequestInterface

Authorization header is Loco's preferred authorization method.

Add Authorization header to request if API key is set, unless query is explicitly configured as auth method. Unset key from command to avoid sending it as a query param.

Parameters

\GuzzleHttp\Command\CommandInterface $command
\Psr\Http\Message\RequestInterface $request

Throws

\InvalidArgumentException

Returns

\Psr\Http\Message\RequestInterface —

createRequest()

createRequest(\GuzzleHttp\Command\CommandInterface  $command) : \Psr\Http\Message\RequestInterface

Create a request for the command and operation

Parameters

\GuzzleHttp\Command\CommandInterface $command

Throws

\RuntimeException

Returns

\Psr\Http\Message\RequestInterface —

createCommandWithUri()

createCommandWithUri(\GuzzleHttp\Command\Guzzle\Operation  $operation, \GuzzleHttp\Command\CommandInterface  $command) : \GuzzleHttp\Psr7\Request

Create a request for an operation with a uri merged onto a base URI

Parameters

\GuzzleHttp\Command\Guzzle\Operation $operation
\GuzzleHttp\Command\CommandInterface $command

Returns

\GuzzleHttp\Psr7\Request —