/** * @param array $options * @param HttpClientInterface $httpClient */ public function __construct(array $options = [], HttpClientInterface $httpClient = null) { $resolver = new OptionsResolver(); $this->configureOptions($resolver); $this->options = $resolver->resolve($options); $this->httpClient = $httpClient ? $httpClient : new GuzzleHttpClient(); $this->httpClient->init($this->options); }
/** * Call DELETE http client request. * * @param string $path Request path * @param mixed $body Request body * @param array $headers Reconfigure the request headers for this call only * * @return array */ protected function delete($path, $body = null, array $headers = []) { $response = $this->httpClient->delete($path, $body, $headers); return $this->parseResponseContent($response); }