Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #2065
| Newsgroups | comp.databases.ms-sqlserver |
|---|---|
| Date | 2020-07-31 14:08 -0700 |
| Message-ID | <9ba2f743-ec87-40c7-9c48-fb8cd56a4783n@googlegroups.com> (permalink) |
| Subject | sp_OAMethod |
| From | Tito <yosiasz@gmail.com> |
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;
Back to comp.databases.ms-sqlserver | Previous | Next | Find similar
sp_OAMethod Tito <yosiasz@gmail.com> - 2020-07-31 14:08 -0700
csiph-web