Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

sp_oamethod post json

Declare @Object as Int;
Declare @ResponseText as Varchar(8000);
Declare @Body as varchar(8000) = 
'{
    "Subsystem": 1,
    "Exception": "",
    "Message": "I have done what you asked",
    "Time": "2014-06-09T11:16:35",
    "Attribute": { "Number of attempts": "0" }
}'  

Exec sp_OACreate 'MSXML2.ServerXMLHTTP', @Object OUT;
EXEC  sp_OAMethod @Object, 'open', NULL, 'post','https://thecorrecturl:446/api/handelse/', 'false'

Exec sp_OAMethod @Object, 'setRequestHeader', null, 'Content-Type', 'application/json'
Exec sp_OAMethod @Object, 'send', null, @body

Exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
Select @ResponseText

Exec sp_OADestroy @Object
Comment

PREVIOUS NEXT
Code Example
Javascript :: d3js circle out of scrren 
Javascript :: apache log format json 
Javascript :: javascript Arranging Coins 
Javascript :: match 10-12 digit javascript safaricom 
Javascript :: express pourquoi mettre bodyparser avant router 
Javascript :: apollo graphql clearstore example 
Javascript :: expecting eof json 
Javascript :: jquery dialog button text set by variable 
Javascript :: scripthelpers 
Javascript :: javascript node await .click 
Javascript :: get minutes with 2 numbers 
Javascript :: Send redirect URL in the text body of mail using nodemailer 
Javascript :: how to make sticky footer with react router 
Javascript :: defer accessing a variable until available in js 
Javascript :: react redux cheat sheet 
Javascript :: how to save image in fabruc js json 
Javascript :: singly even magic square creation algorithm 
Javascript :: expressjs4 async 
Javascript :: 11. Which of the following metals catch fire on reaction with air? A. Magnesium B. Manganese C. Potassium D. Calcium 
Javascript :: regex changing before last dot value 
Javascript :: javascript add color effect 
Javascript :: react native map array of objects 
Javascript :: json etudients 
Javascript :: js code to run hello world 
Javascript :: get each primary colour and add into an array javascript 
Javascript :: retrieve list by id from firebase angular 
Javascript :: why js object alis are on the lef 
Javascript :: currentVal 
Javascript :: redux filter movies list container 
Javascript :: declare a lot of variables js 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =