Have you ever called restlet from javascript? Did ...
# suitescript
t
Have you ever called restlet from javascript? Did you use a third-party library for this? Any sample code would be helpful !
b
https://www.npmjs.com/package/oauth-1.0a works with basically any http request library on node
attempts to use browser javascript are generally doomed, cors restrictions dont allow it
though you can use the internal url of a restlet if you are making the request from within netsuite
t
@battk Yes, I am getting CORS errors, I am trying to call a restlet and use data to display it on a frontend.
Isn’t there a way to call restlets then?
b
use a backend server like node
and then use your frontend to make a request to your own server
t
That means if I have to hit 10k request, all of will pass through server, If my application is used by 10 such customers, it would be 100k requests from my server.
What if I have 10000 customers in long run.
My god.