Call external app from mendix (POST request)

1
Is there a way to send a POST request from a mendix application directly to another application that is not a mendix (as it is possible using POSTMAN to send the request directly)?   I am attaching screenshots of JSON structure, export mapping, domain model (created after export mapping),microflow, CALL REST activity and screenshots from POSTMAN.      
asked
3 answers
5

Yes, have a look at the “Call REST” action. This can be used to call any web visible application, not just REST services, using different HTTP verbs.

https://docs.mendix.com/refguide/call-rest-action 

Hope this helps

answered
1

Hi Petar,

Did you set security right of the REST service your Mendix appliation is calling?

When you test with Postman, the other service sees you as a Client doing a request,

When Mendix does the request it is seen as a Server.

Either adapt the CORS policy in your other service, or whitelist the Mendix application, that should solve your problem.

answered
-1

Hi Petar,

Please change the log level of REST Consume to trace and then you can see the http request. Compare the request of Mendix with Postman.

answered