public function normalizeForHasher(Call $call, HeadersInterface $headers) { $normalizedData = array(); $normalizedData[] = $call->getMethod(); $normalizedData[] = $call->getRequestUri(); $normalizedData[] = $headers['Date']->getHeader(); $normalizedData[] = $headers['Accept']->getHeader(); $normalizedData[] = $headers['Accept-Language']->getHeader(); $normalizedData[] = $call->getNonce(); $normalizedData[] = $call->getFormattedBody(); $serializedData = implode("", $normalizedData); return $serializedData; }
protected function call() { $this->request->setMethod($this->call->getMethod()); $this->request->setHost($this->call->getRequestPartBase()); $this->request->setResource($this->call->getRequestPartUri()); $this->request->setHeaders($this->headers->getHeaders()); if ($this->call->getFormattedBody()) { $this->request->setContent($this->call->getFormattedBody()); } $this->client->setIgnoreErrors(true); $this->client->setVerifyPeer($this->configuration->getVerifyPeer()); $this->client->setMaxRedirects(0); $this->client->setTimeout(60); $this->client->send($this->request, $this->response); }