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

Breadcrumb

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

function Client::buildClient

Build the Guzzle client instance.

2 calls to Client::buildClient()
Client::createWithConfig in vendor/php-http/guzzle7-adapter/src/Client.php
Factory method to create the Guzzle 7 adapter with custom Guzzle configuration.
Client::__construct in vendor/php-http/guzzle7-adapter/src/Client.php

File

vendor/php-http/guzzle7-adapter/src/Client.php, line 61

Class

Client
HTTP Adapter for Guzzle 7.

Namespace

Http\Adapter\Guzzle7

Code

private static function buildClient(array $config = []) : GuzzleClient {
    $handlerStack = new HandlerStack(Utils::chooseHandler());
    $handlerStack->push(Middleware::prepareBody(), 'prepare_body');
    $config = array_merge([
        'handler' => $handlerStack,
    ], $config);
    return new GuzzleClient($config);
}

API Navigation

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