Hello everyone, Does anyone had to perform a http ...
# suitescript
m
Hello everyone, Does anyone had to perform a http patch from netsuite? I'm building an integration with one of the banks we work with, and this bank has an API that only accepts PATCH, the modelues http and https has no PATCH method. Does anyone faced some similar situation? IS there any workaround?
s
N/http and N/https modules do not support patch requests, so there is no way to make an actual PATCH request. The one option you may have is to override the method via the X-HTTP-Method-Override header: https://www.ibm.com/docs/en/odm/8.10?topic=methods-overriding-security-restrictions-http This only works if the API supports it, however.
m
@scottvonduhn i've tryied already with X-HTTP-Method-Override and it didn't work
s
sadly, unless the API documents some workaround on their end for clients that can’t send PATCH requests, then it won’t be possible to make the call directly, without bouncing it through an external service
The bank chose to require PATCH support in calling clients, and that does mean they are excluding any clients that don’t support that verb, including NetSuite
m
I sent a message to their support team to verify if there is an alternative option