Friday, March 10, 2017

Call an external URL

I need to call an external URL and check the status in laravel 5.4.

I've looked at using Guzzle:

use GuzzleHttp\Client;
....

$client = new Client();
$res = $client->get('some-external-url');
dd($res->getBody());

But with dusk testing and other new things in 5.4, is there a better method now? Also guzzle doesnt appear to be a dependency anymore.



via panthro

Advertisement