Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Middleware.php

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

GuzzleHttp

Code

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

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal