CURL doesn’t work on docker container but postman does on that api

I have a docker container that has an api.php file. When I hit that API using postman it works perfectly fine, but when I hit the API using curl request it doesn’t work and gives a blank return.

Source: Docker Questions