My best guess is that you don't have a timeout set, so the request keeps trying forever.
Try this:
Http::timeout(5)->get("http://127.0.0.1:8000/testtest";);
In Laravel 9, HTTP requests have a timeout set by default. But in Laravel 8 you'll have to set one manually.
minamisawa liked this reply
Thank you for wisdom. We could certainly get a timeout result.
However, we would like to determine the cause if possible. The code on the receiving end of the cURL just returns the simplest json and we are able to get it to work on the server. Is the server started by artisan unable to perform new process generation?
Have you tried using postman/insomnia prior to http:get(), just as a general attempt? Maybe the port is already occupied at the time you send the request?
minamisawa liked this reply
Thank you very much. We were able to figure out the cause of the problem.
And the solution was follows Start on port 8000 and port 8001, open one in a browser and use the other as a destination for cURL.
thank you both for your time.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community