Improved user agent string

This commit is contained in:
Michael 2024-05-10 09:01:43 +00:00
parent 0ae91b59ca
commit afff2b949f
18 changed files with 181 additions and 84 deletions

View file

@ -95,10 +95,11 @@ interface ICanSendHttpRequests
* @param mixed $params POST variables (if an array is passed, it will automatically set as formular parameters)
* @param array $headers HTTP headers
* @param int $timeout The timeout in seconds, default system config value or 60 seconds
* @param string $request The type of the request. This is set in the user agent string
*
* @return ICanHandleHttpResponses The content
*/
public function post(string $url, $params, array $headers = [], int $timeout = 0): ICanHandleHttpResponses;
public function post(string $url, $params, array $headers = [], int $timeout = 0, string $request = ''): ICanHandleHttpResponses;
/**
* Sends an HTTP request to a given url