REST Service on Local Host VM (Hyper V) not working

0
Hi everyone,   I have a question regarding implementing REST Service. So, I’m currently building an application that calls a sample REST API using bearer token (from localhost). It works on Postman, but when I tried to call it in Mendix, it says internal error. Anyone have advices on this? (I’m doing everything inside the VM).   Thanks in advance.    
asked
4 answers
3

Hello Jonathan,

From all the comments, I came up with 2 possible solution.

1. If you are using postman inside vm use https://172.21.16.1:443/{path}
2. If you are using postman outside vm, go outside vm and get the ip and use https://ip:443/{path}

Hope it helps.

answered
3

Hello Jonathan,

If you have the service running in host machine and you are trying to call rest inside virtual machine, don’t use localhost. Change the url to ip:443

You can get the ip in your host machine open cmd or terminal and type ipconfig


Hope my answer helps. Reach me out for any queries.

answered
0

This is the information I get from my local laptop.

 

This is the URL that I’ve changed as your recommendation. Am I doing it correctly? (Note: Mendix Studio Pro is located inside the VM)

answered
0

Hi Abishek,

 

Just want to update you. After modifying the REST API, now it works. Seems like previously something is wrong in the API settings.

 

Thank you.

answered