How to connect to 127.0.0.1 in Mamp server?

I’m trying to connect to a local api on an android app in the simulator. Finally tracked the issue to 127.0.0.1 which gives a 404 calling a simple curl http://127.0.0.1 from the host machine, running Mamp.

localhost is working fine and I have 127.0.0.1 localhost in my etc/hosts.

I understand this should work out of the box, am I missing something obvious? Any hint in the right direction would be much appreciated.

Just to clarify, I’m mentioning the simulator for more context, but the issue is clearly somewhere on macOS / MAMP configuration. Also, I can ping 127.0.0.1, it’s the curl command what’s giving 404, and therefore no other call works.