Greetings,
I have a need to call a rest api against a resource. It a POST and would like to send the following as POST option
http.post(url,
'{
"https": { rejectUnauthorized: settings.ssl },
"headers": {
"Authorization": "BASIC dfsdkfdsfyduyfiuhdfiuyu5y43=",
"Content-Type": "application/json",
"Accept": "application/json"
}
}'
)
Tried to this but it fails
EXEC @ret = sp_OAMethod @token, 'open', NULL, 'POST', @url, 'false';
EXEC @ret = sp_OAMethod @token, 'setRequestHeader', NULL, 'Authentication', @authHeader;
EXEC @ret = sp_OAMethod @token, 'setRequestHeader', NULL, 'Content-type', @contentType;
EXEC @ret = sp_OAMethod @token, 'setRequestHeader', NULL, 'https', '{"rejectUnauthorized":"false"}';
EXEC @ret = sp_OAMethod @token, 'send', NULL, null;