/**
* @param string $method HTTP method.
* @param string|\Psr\Http\Message\UriInterface $uri URI object or string.
* @param array $options Request options to apply.
*
* @return ResponseInterface
* @throws \GuzzleHttp\Exception\GuzzleException
*/
public function request($method, $uri, $options = [])
{
if ($this->authorization !== null) {
$authHeader = sprintf('%s %s', $this->authorization->getAuthType(), $this->authorization->getCredentials());
$headers = isset($options['headers']) ? $options['headers'] : [];
$headers['Authorization'] = $authHeader;
$options['headers'] = $headers;
}
return $this->client->request($method, $uri, $options);
}