Documentation

PrepareBodyMiddleware
in package

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

Tags
final

Table of Contents

$nextHandler  : mixed
__construct()  : mixed
__invoke()  : PromiseInterface
addExpectHeader()  : void
Add expect header

Properties

Methods

__construct()

public __construct(callable $nextHandler) : mixed
Parameters
$nextHandler : callable
Return values
mixed

addExpectHeader()

Add expect header

private addExpectHeader(RequestInterface $request, array<string|int, mixed> $options, array<string|int, mixed> &$modify) : void
Parameters
$request : RequestInterface
$options : array<string|int, mixed>
$modify : array<string|int, mixed>
Return values
void

Search results