Skip to content

Commit

Permalink
bugfix: fix request method error
Browse files Browse the repository at this point in the history
  • Loading branch information
G-YDG committed Mar 23, 2023
1 parent 11e033a commit 79200e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/KwaixiaodianApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public function request(string $method, array $param, string $request_method): a
$params['sign'] = $this->makeSign($params, $config['sign_secret']);

if ($request_method == 'POST') {
$response = $this->getHttpClient()->get($this->getUri($method), $params);
} else {
$response = $this->getHttpClient()->post($this->getUri($method), $params);
} else {
$response = $this->getHttpClient()->get($this->getUri($method), $params);
}

return Utils::jsonResponseToArray($response);
Expand Down

0 comments on commit 79200e9

Please sign in to comment.