Getting to Know the Laravel HTTP Client

3 weeks ago

mpociot

Example snippet using the new Laravel 7 HTTP client. The example code is coming from Laravel News.

Code

$response = Http::get('https://api.github.com/users/paulredmond/gists' );

// Array of data from the JSON response
$data = $response->json();