Open Monograph Press  3.3.0
GuzzleHttp\PrepareBodyMiddleware Class Reference

Public Member Functions

 __construct (callable $nextHandler)
 
 __invoke (RequestInterface $request, array $options)
 

Detailed Description

Prepares requests that contain a body, adding the Content-Length, Content-Type, and Expect headers.

Definition at line 12 of file PrepareBodyMiddleware.php.

Constructor & Destructor Documentation

◆ __construct()

GuzzleHttp\PrepareBodyMiddleware::__construct ( callable  $nextHandler)
Parameters
callable$nextHandlerNext handler to invoke.

Definition at line 23 of file PrepareBodyMiddleware.php.

Member Function Documentation

◆ __invoke()

GuzzleHttp\PrepareBodyMiddleware::__invoke ( RequestInterface  $request,
array  $options 
)
Parameters
RequestInterface$request
array$options
Returns
PromiseInterface

Definition at line 34 of file PrepareBodyMiddleware.php.

References GuzzleHttp\Psr7\mimetype_from_filename(), and GuzzleHttp\Psr7\modify_request().


The documentation for this class was generated from the following file: