0

I have a Laravel app running in Docker containers using Laravel Sail. I want to call an endpoint of the same laravel app from the same app.

I am using Guzzle HTTP client for that, but since app is running inside the container ( using Sail ) it is not able to connect to it and make request.

I tried using host.docker.internal as host for my endpoint but this gives me 502 bad gateway.

which host should I use to make requests inside the same container?

Rakesh K
  • 1,290
  • 1
  • 16
  • 43