RequestFactory implements RequestFactoryInterface
Front-end for sending requests, using PSR-7.
Table of Contents
Interfaces
- RequestFactoryInterface
Methods
- __construct() : mixed
- createRequest() : RequestInterface
- Create a new request.
- request() : ResponseInterface
- Create a Guzzle request object with our custom implementation
Methods
__construct()
public
__construct(GuzzleClientFactory $guzzleFactory) : mixed
Parameters
- $guzzleFactory : GuzzleClientFactory
createRequest()
Create a new request.
public
createRequest(string $method, UriInterface|string $uri) : RequestInterface
Parameters
- $method : string
-
The HTTP method associated with the request.
- $uri : UriInterface|string
-
The URI associated with the request.
Return values
RequestInterfacerequest()
Create a Guzzle request object with our custom implementation
public
request(string $uri[, string $method = 'GET' ][, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $uri : string
-
the URI to request
- $method : string = 'GET'
-
the HTTP method (defaults to GET)
- $options : array<string|int, mixed> = []
-
custom options for this request