Documentation

GuzzleHttpClient
in package
implements HttpClientInterface

Table of Contents

Interfaces

HttpClientInterface

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

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
throws
Exception
Return values
string

handleRequestException()

Extracts a meaningful error response from a RequestException.

private handleRequestException(RequestException $e) : mixed|string
Parameters
$e : RequestException
Return values
mixed|string

        
On this page

Search results