7 months ago

API Call not returning a response

Posted 7 months ago by leonvr

This works fine:


Route::get('all', function () {
    return 'everybody may access this api route';

But when I call the same route from within another route, I never get a response, and it keeps spinning...

What am I doing wrong?


Route::get('/test', '[email protected]');


use GuzzleHttp\Client;

class AuthController extends Controller
    public function test(Request $request)
        $client = new Client([
            'timeout'  => 8.0,

        //return 'gets here ok1';
        $response = $client->get('');
        //return 'does NOT get here';
        //500 internal error, the timeout I set at above line, otherwise it keeps spinning
        return $response->getBody();

So never gets back...

Please sign in or create an account to participate in this conversation.