79512400

Date: 2025-03-16 10:24:46
Score: 1
Natty:
Report link

In my case, I had to include a custom user-agent header along with either acceptJson() or accept('application/json').

\Illuminate\Support\Facades\Http::acceptJson()->withHeaders([
        'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36'
])->get($url);

https://laravel.com/docs/12.x/http-client#headers

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Buraco