public function HttpClientTrait::getHttpClient in Remote Stream Wrapper 8
Returns the HTTP client.
Return value
File
- src/
HttpClientTrait.php, line 36
Class
- HttpClientTrait
- Trait to help reuse HTTP client logic.
Namespace
Drupal\remote_stream_wrapperCode
public function getHttpClient() {
if (!isset($this->httpClient)) {
$this->httpClient = \Drupal::httpClient();
}
return $this->httpClient;
}