Skip to content

Instantly share code, notes, and snippets.

@theorigin
theorigin / SQLServer-APIPost.sql
Last active March 15, 2025 03:16
SQL Server code to POST to an API
DECLARE @Object AS INT;
DECLARE @ResponseText AS VARCHAR(8000);
DECLARE @Body AS VARCHAR(8000) =
'{
"what": 1,
"ever": "you",
"need": "to send as the body"
}'
EXEC sp_OACreate 'MSXML2.XMLHTTP', @Object OUT;