Hey folks, using `N/https`, is it possible to send...
# suitescript
m
Hey folks, using
N/https
, is it possible to send a
PATCH
https request? I'm not seeing an option 😕. NVM looked... it looks like Netsuite does not support it 😕 That's a real bummer.
a
Have you tried making the HTTP request using vanilla javascript, i.e. not using the NS API? That might work if the target is not a NetSuite endpoint. I think NetSuite endpoints themselves do not accept PATCH but I could be mistaken.
I also just found this thing: N/scriptTypes/restlet Module I'm not sure, but skimming over the documentation, it looks like it MIGHT work for receiving a PATCH request (not sure), but not for sending one.
m
@Aaron McCausland Sorry about the late reply. This was server side in this case, so I wasn't able to use vanilla JS requests 😕. Restlets wouldn't work for this either - they are more for making your own endpoint rather than making outgoing requests. Thanks for your help though 🙂.
In any case, it turned out the API endpoint I was calling had an undocumented way to 'batch requests', and with it you could put a PATCH inside of a POST request... so I ended up using that 😛