RequestFactory implements RequestFactoryInterface

Front-end for sending requests, using PSR-7.

Attributes
#[AsAlias]
\Psr\Http\Message\RequestFactoryInterface::class
$public: true

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

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
RequestInterface

request()

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

Return values
ResponseInterface

        
On this page

Search results