Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 83469

React Native request error (native published REST services)

$
0
0
Hi there , We are currently trying to connect a React Native frontend to our Mendix backend. We are getting the following error:   Failed to load https://{host}/rest/v1/user/login: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 405. I am using native Mendix REST in 7.10 and I added the header: Access-Control-Allow-Origin: * to all my responses. The endpoint works fine when testing it with Postman and Stoplight but the React requests do not work.... It seems that the HTTP method is OPTIONS instead of POST / PUT / GET / DELETE. Does anyone know how to solve this?  Kind regards, Tim    

Viewing all articles
Browse latest Browse all 83469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>