Skip to content

Commit

Permalink
fix api for http client test case
Browse files Browse the repository at this point in the history
  • Loading branch information
joelwurtz committed Apr 10, 2024
1 parent 95cb1f0 commit 45183b2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/HttpClient/HttpClientWebCaseTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,38 @@
namespace Asynit\HttpClient;

use Amp\Http\Client\Request;
use Amp\Http\HttpResponse;
use Amp\Http\Client\Response;

trait HttpClientWebCaseTrait
{
use HttpClientCaseTrait;

final protected function get(string $uri, array $headers = [], $body = null): HttpResponse
final protected function get(string $uri, array $headers = [], $body = null): Response
{
return $this->sendRequest($this->createRequest('GET', $uri, $headers, $body));
}

final protected function post(string $uri, array $headers = [], $body = null): HttpResponse
final protected function post(string $uri, array $headers = [], $body = null): Response
{
return $this->sendRequest($this->createRequest('POST', $uri, $headers, $body));
}

final protected function patch(string $uri, array $headers = [], $body = null): HttpResponse
final protected function patch(string $uri, array $headers = [], $body = null): Response
{
return $this->sendRequest($this->createRequest('PATCH', $uri, $headers, $body));
}

final protected function put(string $uri, array $headers = [], $body = null): HttpResponse
final protected function put(string $uri, array $headers = [], $body = null): Response
{
return $this->sendRequest($this->createRequest('PUT', $uri, $headers, $body));
}

final protected function delete(string $uri, array $headers = [], $body = null): HttpResponse
final protected function delete(string $uri, array $headers = [], $body = null): Response
{
return $this->sendRequest($this->createRequest('DELETE', $uri, $headers, $body));
}

final protected function options(string $uri, array $headers = [], $body = null): HttpResponse
final protected function options(string $uri, array $headers = [], $body = null): Response
{
return $this->sendRequest($this->createRequest('OPTIONS', $uri, $headers, $body));
}
Expand Down

0 comments on commit 45183b2

Please sign in to comment.