You are here

public static function Middleware::prepareBody in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/guzzlehttp/guzzle/src/Middleware.php \GuzzleHttp\Middleware::prepareBody()

This middleware adds a default content-type if possible, a default content-length or transfer-encoding header, and the expect header.

Return value

callable

1 call to Middleware::prepareBody()
HandlerStack::create in vendor/guzzlehttp/guzzle/src/HandlerStack.php
Creates a default handler stack that can be used by clients.

File

vendor/guzzlehttp/guzzle/src/Middleware.php, line 213

Class

Middleware
Functions used to create and wrap handlers with handler middleware.

Namespace

GuzzleHttp

Code

public static function prepareBody() {
  return function (callable $handler) {
    return new PrepareBodyMiddleware($handler);
  };
}