Accessing REST Web Service

Tags
#restservice #curl, advanced, postman, rest, service, web

 
Thread Tools Search this Thread
# 1  
Old 5 Days Ago
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!
# 2  
Old 5 Days Ago
Did you use POSTMAN on the localhost to test first? Sounds like you only tested locally with cURL?
# 3  
Old 5 Days Ago
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.
# 4  
Old 5 Days Ago
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?
# 5  
Old 5 Days Ago
Correct.
# 6  
Old 5 Days Ago
So this sounds like a POSTMAN configuration issue if that is the case.

Did you check the syslog files for clues?
# 7  
Old 5 Days Ago
Can you check if the REST application is listening only on localhost only perhaps ?
Code:
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.

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Working web service call not working with curl abigbear Shell Programming and Scripting 3 08-13-2017 04:02 PM
How to call perl web service from javascript? liyakathali Shell Programming and Scripting 3 11-07-2012 05:57 PM
Web Service in Perl CGI scripting liyakathali Shell Programming and Scripting 1 10-30-2012 07:38 AM
web service call: curl output to xsltproc input webuser Shell Programming and Scripting 3 07-16-2011 10:48 AM
Accessing UNIX hosted web site remotely campbellg UNIX for Dummies Questions & Answers 4 07-22-2010 12:26 PM
Oracle Database and HTTPD Web Service asalman.qazi Solaris 1 11-11-2009 01:48 PM
Call web service from Shell hapytran Shell Programming and Scripting 2 10-04-2009 03:31 AM
How to call a web service using perl chriss_58 Shell Programming and Scripting 3 05-19-2009 12:06 PM
Need to Call Web Service from Unix jahooper UNIX for Dummies Questions & Answers 0 04-27-2009 12:49 PM
Accessing Web Page Imtiaz UNIX for Dummies Questions & Answers 3 06-08-2005 09:53 AM