protected function get($uri, array $options = []) { try { $response = $this->httpClient->get($uri, $options); return $response->getBody()->getContents(); } catch (RequestException $exception) { throw ExceptionWrapper::wrap($exception, $this->serializer); } }
/** * @param string $url * * @param array $options * * @return \GuzzleHttp\Psr7\Response */ public function downloadAttachment($url, $options = []) { try { $url = str_replace(" ", "%20", $url); return $this->httpClient->attachmentRequest($url, $options); } catch (RequestException $exception) { throw ExceptionWrapper::wrap($exception, $this->serializer); } }