Documentation

HttpMethodsClient
in package
implements HttpMethodsClientInterface

FinalYes

Table of Contents

Interfaces

HttpMethodsClientInterface
Convenience HTTP client that integrates the MessageFactory in order to send requests in the following form:.

Properties

$httpClient  : ClientInterface
$requestFactory  : RequestFactory|RequestFactoryInterface
$streamFactory  : StreamFactoryInterface|null

Methods

__construct()  : mixed
delete()  : ResponseInterface
Sends a DELETE request.
get()  : ResponseInterface
Sends a GET request.
head()  : ResponseInterface
Sends an HEAD request.
options()  : ResponseInterface
Sends an OPTIONS request.
patch()  : ResponseInterface
Sends a PATCH request.
post()  : ResponseInterface
Sends a POST request.
put()  : ResponseInterface
Sends a PUT request.
send()  : ResponseInterface
Sends a request with any HTTP method.
sendRequest()  : ResponseInterface
Sends a PSR-7 request and returns a PSR-7 response.
trace()  : ResponseInterface
Sends a TRACE request.
createRequest()  : RequestInterface

Properties

Methods

delete()

Sends a DELETE request.

public delete(mixed $uri[, array<string|int, mixed> $headers = [] ][, mixed $body = null ]) : ResponseInterface
Parameters
$uri : mixed
$headers : array<string|int, mixed> = []
$body : mixed = null
Return values
ResponseInterface

options()

Sends an OPTIONS request.

public options(mixed $uri[, array<string|int, mixed> $headers = [] ][, mixed $body = null ]) : ResponseInterface
Parameters
$uri : mixed
$headers : array<string|int, mixed> = []
$body : mixed = null
Return values
ResponseInterface

patch()

Sends a PATCH request.

public patch(mixed $uri[, array<string|int, mixed> $headers = [] ][, mixed $body = null ]) : ResponseInterface
Parameters
$uri : mixed
$headers : array<string|int, mixed> = []
$body : mixed = null
Return values
ResponseInterface

post()

Sends a POST request.

public post(mixed $uri[, array<string|int, mixed> $headers = [] ][, mixed $body = null ]) : ResponseInterface
Parameters
$uri : mixed
$headers : array<string|int, mixed> = []
$body : mixed = null
Return values
ResponseInterface

put()

Sends a PUT request.

public put(mixed $uri[, array<string|int, mixed> $headers = [] ][, mixed $body = null ]) : ResponseInterface
Parameters
$uri : mixed
$headers : array<string|int, mixed> = []
$body : mixed = null
Return values
ResponseInterface

send()

Sends a request with any HTTP method.

public send(string $method, mixed $uri[, array<string|int, mixed> $headers = [] ][, mixed $body = null ]) : ResponseInterface
Parameters
$method : string

HTTP method to use

$uri : mixed
$headers : array<string|int, mixed> = []
$body : mixed = null
Return values
ResponseInterface

        
On this page

Search results