I created a Restlet and tested it with Postman, ev...
# suitescript
s
I created a Restlet and tested it with Postman, everything is fine. The front end is done with React, they tried to called the Restlet and they got error. Reading the web, I see that I have to call a Suitelet, which will got the restlet... Is it the way it is ?
c
I'm sure you can call the restlet directly
s
But we get the CORS issue
c
What are you doing to get a CORS issue?
s
A simple call from React (Javascript) to Netsuite
c
You probably need some auth headers in the call from react.
s
Yes Keep in mind, Postman create it's own signature
e
I fixed the CORS issue by using the standard https GET and POST calls from the N/https module but since you're calling the RESTlet from React you probably won't benefit from that.
b
react is a little general, it now has variations that runs on differnt platforms
but in general a browser like context will have to deal with cross origin related issues
the external url for a restlet is meant to be used in server to server contexts