I have a RESTful web service taking all 4 HTTP request methods. I am getting proper responses when I am using a rest client (Advanced Rest Client in Chrome) to send requests to this service using the ip address of the machine. My url is this http://ipaddress:8080/messenger/webapi/messages. However, when I use curl to fire the same requests I get curl: (56) Recv failure: Connection was reset. The only difference I found out in the two was that the REST client fires requests from 0.0.0.0 and the curl requests are fired from 127.0.0.1. But why should this make any difference?
The same curl command works when the app is running on the same machine from which the curl is fired. It doesn't work only when the app is running on another machine. Eg. curl http://ipaddress:8080/messenger/webapi/messages for GET request.
I tried disabling the firewall on the machine having the app with no luck.
curl http://serverwas failing withcurl: (56) Recv failure: Connection was reset.