Laravel Http curl error 28 when trying to call two APIs within same controller

Viewed 8

I am facing a weird issue where I cannot call two Api call within same controller. When I try to call one API, it works. Here is my code

$response1 = Http::get($this->permissionApiUrl);
$this->handleResponse($response1, 'permission');

$response2 = Http::get($this->rolesApiUrl);
$this->handleResponse($response2, 'role');

It gives the following error.

cURL error 28: Operation timed out after 30004 milliseconds with 0 bytes received.

Any suggestion on how I can solve this?

0 Answers
Related