function Middleware::prepareBody
This middleware adds a default content-type if possible, a default content-length or transfer-encoding header, and the expect header.
2 calls to Middleware::prepareBody()
- Client::buildClient in vendor/
php-http/ guzzle7-adapter/ src/ Client.php - Build the Guzzle client instance.
- 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 230
Class
- Middleware
- Functions used to create and wrap handlers with handler middleware.
Namespace
GuzzleHttpCode
public static function prepareBody() : callable {
return static function (callable $handler) : PrepareBodyMiddleware {
return new PrepareBodyMiddleware($handler);
};
}