You are here

protected function SDKConnector::httpClientConfiguration in Apigee Edge 8

Same name in this branch
  1. 8 src/SDKConnector.php \Drupal\apigee_edge\SDKConnector::httpClientConfiguration()
  2. 8 modules/apigee_edge_debug/src/SDKConnector.php \Drupal\apigee_edge_debug\SDKConnector::httpClientConfiguration()
  3. 8 tests/modules/apigee_edge_test/src/SDKConnector.php \Drupal\apigee_edge_test\SDKConnector::httpClientConfiguration()

Get HTTP client overrides for Apigee Edge API client.

Allows to override some configuration of the http client built by the factory for the API client.

Return value

array Associative array of configuration settings.

See also

http://docs.guzzlephp.org/en/stable/request-options.html

1 call to SDKConnector::httpClientConfiguration()
SDKConnector::buildClient in src/SDKConnector.php
Returns a pre-configured API client with the provided credentials.
2 methods override SDKConnector::httpClientConfiguration()
SDKConnector::httpClientConfiguration in modules/apigee_edge_debug/src/SDKConnector.php
Get HTTP client overrides for Apigee Edge API client.
SDKConnector::httpClientConfiguration in tests/modules/apigee_edge_test/src/SDKConnector.php
Get HTTP client overrides for Apigee Edge API client.

File

src/SDKConnector.php, line 145

Class

SDKConnector
Provides an Apigee Edge SDK connector.

Namespace

Drupal\apigee_edge

Code

protected function httpClientConfiguration() : array {
  return [
    'connect_timeout' => $this->configFactory
      ->get('apigee_edge.client')
      ->get('http_client_connect_timeout') ?? 30,
    'timeout' => $this->configFactory
      ->get('apigee_edge.client')
      ->get('http_client_timeout') ?? 30,
    'proxy' => $this->configFactory
      ->get('apigee_edge.client')
      ->get('http_client_proxy') ?? '',
  ];
}