You are here

public static function Drupal::httpClient in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal.php \Drupal::httpClient()

Returns the default http client.

Return value

\GuzzleHttp\Client A guzzle http client instance.

2 calls to Drupal::httpClient()
DrupalTest::testHttpClient in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the httpClient() method.
FileNormalizeTest::setUp in core/modules/hal/src/Tests/FileNormalizeTest.php
Performs setup tasks before each individual test method is run.

File

core/lib/Drupal.php, line 418
Contains \Drupal.

Class

Drupal
Static Service Container wrapper.

Code

public static function httpClient() {
  return static::getContainer()
    ->get('http_client');
}