Locally hosted ORS doesnt respond to post method

I have installed ORS locally on a windows server with Windows subsystem linux installed. The server status is ready and it is allowing me to trigger the GET api that is shipped with standard data at first installation. But when I try to use the post method with the sample data for directions api, it says “getaddrinfo ENOTFOUND locahost”

has anyone encountered this issue before ? or any ideas on how to solve this ?

Hey,

no, if it responds to GET requests, it should also respond to POST-requests…
Assuming you copied your error message (and didn’t type it out manually), the issue could be the missing second l in localhost.

If not, could you please paste the complete request and response/error you got?

Best regards

1 Like

Hi.

I wasted hours trying to find multiple solutions to this. You were probably right. I tried it all over again and it started to work on its own. Sorry for wasting your time too for looking into my stupid issues. Appologies.

While at that, can you please also tell me if there is any config file that we need to go and make a change in to make the api accessible outside the server ? i tried changing hostname in the config file and put the server ip address there but it is still not publicly reachable. I have opened the port on server for sure.

thank you for your help.

Regards
Nimish