Documentation

PrepareBodyMiddleware
in package

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

Table of Contents

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

Properties

Methods

__construct()

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

Next handler to invoke.

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