Skip to content

Commit

Permalink
增加获取接口信息功能
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwuxin committed Mar 26, 2024
1 parent e77e786 commit 183fca2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,18 @@ public function resolveUri()
}
}

public function request()
/**
* @param $info bool 获取接口信息
*/
public function request($info = false)
{
$this->resolveOptions();
$this->resolveUri();

$method = $info ? 'OPTIONS' : $this->method;

try {
return $this->group->request($this->method, $this->uri, $this->options);
return $this->group->request($method, $this->uri, $this->options);
} catch (RequestException $e) {
if ($e->hasResponse()) {
$response = $e->getResponse();
Expand Down

0 comments on commit 183fca2

Please sign in to comment.