Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 7005d1d

Browse files
committed
🛀
1 parent dd0af98 commit 7005d1d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

examples/oauth-example-common.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,22 @@ public function __construct(ContainerInterface $options){
8181
$this->client = new TinyCurlClient($this->options, new Request($this->options));
8282
}
8383

84-
public function request(string $url, array $params = null, string $method = null, $body = null, array $headers = null):HTTPResponseInterface{
85-
$args = func_get_args();
86-
$this->logger->debug('$args', $args);
84+
protected function getResponse():HTTPResponseInterface{
85+
86+
$this->logger->debug('$args', [
87+
'$url' => $this->requestURL,
88+
'$params' => $this->requestParams,
89+
'$method' => $this->requestMethod,
90+
'$body' => $this->requestBody,
91+
'$headers' => $this->requestHeaders,
92+
]);
93+
94+
$response = $this->client->request($this->requestURL, $this->requestParams, $this->requestMethod, $this->requestBody, $this->requestHeaders);
8795

88-
$response = $this->client->request(...$args);
8996
$this->logger->debug($response->body, (array)$response->headers);
9097

9198
usleep($this->options->sleep * 1000000);
99+
92100
return $response;
93101
}
94102

0 commit comments

Comments
 (0)