]> git.mxchange.org Git - friendica.git/commitdiff
Expose IHTTPClient::request()
authorPhilipp <admin@philipp.info>
Wed, 25 Aug 2021 18:46:47 +0000 (20:46 +0200)
committerPhilipp <admin@philipp.info>
Wed, 25 Aug 2021 19:31:30 +0000 (21:31 +0200)
src/Network/HTTPClient.php
src/Network/IHTTPClient.php

index f4293cd0866da9f935d4b6ebf7d46327d23d2a3c..eabd5d450791fa298d0c5a623d91294406c222c4 100644 (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]);
index f7064e1c0ff9394d4465583ed4756b816411a651..c7d122c8f143d302c8411f58cf5e550f0425f495 100644 (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
         *