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.
Check which port curl uses and whether it is blocked by the firewall or not. Also check whether the port on the app accepts requests.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With