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

Breadcrumb

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

function choose_handler

Chooses and creates a default handler to use based on the environment.

The returned handler is not wrapped by any default middlewares.

Return value

callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.

Throws

\RuntimeException if no viable Handler is available.

Deprecated

choose_handler will be removed in guzzlehttp/guzzle:8.0. Use Utils::chooseHandler instead.

File

vendor/guzzlehttp/guzzle/src/functions.php, line 59

Namespace

GuzzleHttp

Code

function choose_handler() : callable {
    return Utils::chooseHandler();
}
RSS feed
Powered by Drupal