Can you make a rest request from SS2.0?
# suitescript
k
Can you make a rest request from SS2.0?
b
be more specific
do you mean a request to a RESTlet or do you wish to integrate to a RESTful webservice
k
I have someone who wants a magic button to send a JSON blob to a Magento REST endpoint to test if it's receiving data from NetSuite
It's easy enough to create a button in a suitelet, getting it to send data is another thing entirely. 😆
b
you can use N/https, but if you are doing this clientside, you can use something more modern like window.fetch
k
yeah, I'm doing it client side
b
wait, wrong idea
use N/https
k
heh ok
can N/https do OAuth?
b
im not sure how controllable CORS is on a magento server, so im not sure if fetch works
k
ok
b
N/https doesn't explicitly support Oauth 1, but you can use something like https://www.npmjs.com/package/oauth-1.0a in combination with it
k
cool thanks