sp oamethod post json

Solutions on MaxInterview for sp oamethod post json by the best coders in the world

showing results for - "sp oamethod post json"
Santiago
13 Mar 2018
1Declare @Object as Int;
2Declare @ResponseText as Varchar(8000);
3Declare @Body as varchar(8000) = 
4'{
5    "Subsystem": 1,
6    "Exception": "",
7    "Message": "I have done what you asked",
8    "Time": "2014-06-09T11:16:35",
9    "Attribute": { "Number of attempts": "0" }
10}'  
11
12Exec sp_OACreate 'MSXML2.ServerXMLHTTP', @Object OUT;
13EXEC  sp_OAMethod @Object, 'open', NULL, 'post','https://thecorrecturl:446/api/handelse/', 'false'
14
15Exec sp_OAMethod @Object, 'setRequestHeader', null, 'Content-Type', 'application/json'
16Exec sp_OAMethod @Object, 'send', null, @body
17
18Exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
19Select @ResponseText
20
21Exec sp_OADestroy @Object
queries leading to this page
sp oamethod post jsonsp oamethod post json