GuzzleHttpClient
in package
implements
HttpClientInterface
Table of Contents
Interfaces
Properties
- $guzzleClient : Client
Methods
- __construct() : mixed
- post() : string
- Sends a POST request to the specified URL with the given data.
- handleRequestException() : mixed|string
- Extracts a meaningful error response from a RequestException.
Properties
$guzzleClient
protected
Client
$guzzleClient
Methods
__construct()
public
__construct([int $timeout = 60 ][, bool $verifySSL = true ]) : mixed
Parameters
- $timeout : int = 60
- $verifySSL : bool = true
post()
Sends a POST request to the specified URL with the given data.
public
post(string $url, string $body[, array<string|int, mixed> $headers = [] ]) : string
Parameters
- $url : string
-
The full URL for the request
- $body : string
- $headers : array<string|int, mixed> = []
Tags
Return values
stringhandleRequestException()
Extracts a meaningful error response from a RequestException.
private
handleRequestException(RequestException $e) : mixed|string
Parameters
- $e : RequestException