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
Project information
- Project categories: Developer tools
- Created by zipme_hkt on , updated
Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
