When I try to send a webhook, I encounter a timeout. But only in the Laravel project. When I explicitly specified the domain IP in etc/hosts where I was sending the webhook and sent a request to the server outside the Laravel project, everything worked.
does the request work outside laravel project even if you dont edit /etc/hosts? if not, the problem is probably in the DNS resolution. if it does, why do you need to edit the hosts file?
here is my code, when it is executed, sending takes a long time and at the end it produces null.
maybe there are some errors there, but I don't have an error handler
the spaces in the URL is a mistake or just just a typo? 'h ttp s://si te. co m/rest/84733/'.env('CURL_KEY').'/' . $method . '.json';
try to dump that string in your code and see what you get
$queryUrl = 'h ttp s://si te. co m/rest/84733/'.env('CURL_KEY').'/' . $method . '.json'; //typos or not, just use the line from your actual code
dd($queryUrl);
is the URL correct? does the CURL_KEY and $method replace ok?