Expose IHTTPClient::request()

This commit is contained in:
Philipp 2021-08-25 20:46:47 +02:00
parent c554b629e7
commit 660a3cd247
No known key found for this signature in database
GPG Key ID: 9A28B7D4FF5667BD
2 changed files with 12 additions and 1 deletions

View File

@ -59,7 +59,7 @@ class HTTPClient implements IHTTPClient
/**
* @throws HTTPException\InternalServerErrorException
*/
protected function request(string $method, string $url, array $opts = []): IHTTPResult
public function request(string $method, string $url, array $opts = []): IHTTPResult
{
$this->profiler->startRecording('network');
$this->logger->debug('Request start.', ['url' => $url, 'method' => $method]);

View File

@ -85,6 +85,17 @@ interface IHTTPClient
*/
public function get(string $url, array $opts = []);
/**
* Sends a HTTP request to a given url
*
* @param string $method A HTTP request ()
* @param string $url Url to send to
* @param array $opts parameters
*
* @return IHTTPResult
*/
public function request(string $method, string $url, array $opts = []);
/**
* Send POST request to an URL
*