Accessing REST Web Service

Hello:

I have created a REST service that is currently running on a Unix server. I issued a cURL command to call the REST service and verified it's working as designed; curl --request POST command and the url I used to test it is localhost:8090/someservice/somename. I have a teammate who now wants to access this REST service via Postman. Instead of using localhost in the URL..he substituted it with the server's hostname, but he is not receiving a response.

What would the REST URL Endpoint be for this service to be called externally? Any help would be appreciated!

Did you use POSTMAN on the localhost to test first? Sounds like you only tested locally with cURL?

Thanks for your reply! I tested both ways. I used Postman and passed the localhost URL for the POST call and got "could not get any response." Then I used Postman to convert the call into a cURL command and logged into the server and executed it and it worked.

So if I understand you correctly, cURL works on localhost but POSTMAN does not work with the same URL calling a URL on the same localhost (no remote calls). Is that right?

Correct.

So this sounds like a POSTMAN configuration issue if that is the case.

Did you check the syslog files for clues?

Can you check if the REST application is listening only on localhost only perhaps ?

netstat -an | grep tcp

Look if your app is listening on host ip address or 0.0.0.0 (all interfaces) on port 8090.
If not, change it so it does using application options, look for bind and listen kind of directives.

Since connection from localhost works, i suspect server side is not listening properly.

Hope that helps
Regards
Peasant.