PrepareBodyMiddleware
    
            
            in package
            
        
    
    
    
Prepares requests that contain a body, adding the Content-Length, Content-Type, and Expect headers.
Tags
Table of Contents
Properties
- $nextHandler : callable(RequestInterface, array<string|int, mixed>): PromiseInterface
 
Methods
- __construct() : mixed
 - __invoke() : PromiseInterface
 - addExpectHeader() : void
 - Add expect header
 
Properties
$nextHandler
    private
        callable(RequestInterface, array<string|int, mixed>): PromiseInterface
    $nextHandler
    
    
    
    
    
Methods
__construct()
    public
                    __construct(callable(RequestInterface, array<string|int, mixed>): PromiseInterface $nextHandler) : mixed
    Parameters
- $nextHandler : callable(RequestInterface, array<string|int, mixed>): PromiseInterface
 - 
                    
Next handler to invoke.
 
__invoke()
    public
                    __invoke(RequestInterface $request, array<string|int, mixed> $options) : PromiseInterface
    Parameters
- $request : RequestInterface
 - $options : array<string|int, mixed>
 
Return values
PromiseInterfaceaddExpectHeader()
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>