Laravel Http Client
Security covered
Drupal 10–11
This module integrates the Laravel HTTP client into Drupal, providing a streamlined way to make HTTP requests with features like retries and custom headers, mirroring the functionality available in the Laravel framework. It allows developers to leverage Laravel's robust HTTP client capabilities directly within their Drupal projects.
Integrate the Laravel Http client with Drupal
use Drupal\laravel_http_client\Service\Http;
// Retry time and delay in ms.
Http::retry(3, 100)->withQueryParameters([
'name' => 'Taylor',
'page' => 1,
])->get('http://example.com/users')
Http::macro('github', function () {
return Http::withHeaders([
'X-Example' => 'example',
])->baseUrl('https://github.com');
});
$response = Http::github()->get('/');
Detail use of Laravel Http client
https://laravel.com/docs/11.x/http-client
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 11.0.1 | Stable | 10–11 | Update illuminate/http to V11 | Jun 13, 2025 | |
| 10.0.1-beta1 | Pre-release | 10–11 | Add laravel http client | Nov 14, 2024 |