declare @out varchar(max)
--text to send to the web service
set @out = 'text to send to web service'
--the text can be XML
set @out = '<content>the text can be XML</content>'
--or JSON
set @out = '{
"id": 1,
"name": "A green door",
}'
Declare @Object as Int;
Declare @ResponseText as Varchar(8000);
Exec sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;
Exec sp_OAMethod @Object, 'open', NULL, 'get',@out, 'false'
Exec sp_OAMethod @Object, 'send'
Exec sp_OAMethod @Object, 'responseText', @ResponseText OUTPUT
Select @ResponseText