diff --git a/src/Request.php b/src/Request.php index 7399215..1d1688c 100644 --- a/src/Request.php +++ b/src/Request.php @@ -38,6 +38,8 @@ class Request protected $version=''; + protected $response_headers=[]; + public function __construct(array $data) { $this->key=$data['key'] ?? ''; @@ -136,6 +138,9 @@ protected function send(){ die;*/ $response = $client->request($this->type, $url, $this->options); + $this->response_headers = $response->getHeaders(); + + return $response->getBody()->getContents(); } @@ -169,4 +174,11 @@ protected function exec(){ throw new Exception(json_encode($temp)); } } + + /** + * Get Response Headers + * */ + public function getResponseHeaders(){ + return $this->response_headers; + } }