Skip to content

Commit

Permalink
Merge pull request #2 from llomgui/patch-1
Browse files Browse the repository at this point in the history
Add getResponseHeaders
  • Loading branch information
zhouaini528 authored Sep 16, 2022
2 parents e182d0c + c4b8261 commit f211500
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class Request
protected $data=[];

protected $options=[];

protected $response_headers = [];


protected $platform='';
Expand Down Expand Up @@ -106,6 +108,13 @@ protected function headers(){
$this->headers['FTX-SIGN']=$this->signature;
}
}

/**
* Get Response Headers
* */
public function getResponseHeaders(){
return $this->response_headers;
}

/**
*
Expand All @@ -132,6 +141,7 @@ protected function send(){
print_r($this->options);*/

$response = $client->request($this->type, $url, $this->options);
$this->response_headers = $response->getHeaders();
return $response->getBody()->getContents();
}

Expand Down

0 comments on commit f211500

Please sign in to comment.