Request type set for all HTTP requests

This commit is contained in:
Michael 2024-05-12 17:53:21 +00:00
parent d788cb82cc
commit 5751e024c0
30 changed files with 129 additions and 90 deletions

View file

@ -39,10 +39,11 @@ interface ICanSendHttpRequests
* @param string $accept_content supply Accept: header with 'accept_content' as the value
* @param int $timeout Timeout in seconds, default system config value or 60 seconds
* @param string $cookiejar Path to cookie jar file
* @param string $request Request Type
*
* @return string The fetched content
*/
public function fetch(string $url, string $accept_content = HttpClientAccept::DEFAULT, int $timeout = 0, string $cookiejar = ''): string;
public function fetch(string $url, string $accept_content = HttpClientAccept::DEFAULT, int $timeout = 0, string $cookiejar = '', string $request = ''): string;
/**
* Fetches the whole response of an URL.
@ -54,10 +55,11 @@ interface ICanSendHttpRequests
* @param string $accept_content supply Accept: header with 'accept_content' as the value
* @param int $timeout Timeout in seconds, default system config value or 60 seconds
* @param string $cookiejar Path to cookie jar file
* @param string $request Request Type
*
* @return ICanHandleHttpResponses With all relevant information, 'body' contains the actual fetched content.
*/
public function fetchFull(string $url, string $accept_content = HttpClientAccept::DEFAULT, int $timeout = 0, string $cookiejar = ''): ICanHandleHttpResponses;
public function fetchFull(string $url, string $accept_content = HttpClientAccept::DEFAULT, int $timeout = 0, string $cookiejar = '', string $request = ''): ICanHandleHttpResponses;
/**
* Send a GET to a URL.