I have a REST web service hosted on tomcat-7 on my local machine. I have an application that uploads a file to a REST service.
Now the problem that I am facing is that when I use the following URL to POST the loaded document, the document loads successfully.
http:
However, when I replace "localhost" with the IP address of my machine and use the following URL
http:
then nothing happens. A POST request never reaches the REST service. However, GET requests work correctly with URL-2.
Please help me in the following points:
Why POST does not work with the IP address of the system, but it works when "localhost" is used instead of IP.
Why does GET work correctly, and the IP address is the URL, but the POST is not.
Thanks in advance.
source share