Calling Http endpoints in T-SQL using CURL extension - Content Type.
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 25/100
Research direction
Start with the linked samples/features/sql-clr/Curl source and locate the CURL.XPOST procedure. Compare its header argument with the provided curl syntax and determine how the Content-Type and API-key headers are represented. Done means the procedure's content type and header format are clearly documented.
Written by the indexing model from the issue text.
Description
In regards to : https://github.com/microsoft/sql-server-samples](https://github.com/Microsoft/sql-server-samples/tree/master/samples/features/sql-clr/Curl)
What is the Content Type of the CURL.XPOST procedure, I need it to be application/json.
I am unable to locate where it mentions what the Content Type is in the source code.
See below for reference:
Curl Syntax:
curl \
-X POST \
-H "Content-Type: application/json" \
-H "simcontrol-api-key: YOUR_API_KEY" \
--data '{ "query": "{ account { name balance } }" }' \
https://app.simcontrol.co.za/graphql/
My CURL.XPOST procedure:
declare @hkey nvarchar(200) = N'Content-Type: application/json/simcontrol-api-key: My-Key';
declare @body nvarchar(4000) = N'{ "query": "{ account { name balance } }" }'
declare @endpoint nvarchar(1000) = N'https://app.simcontrol.co.za/graphql/';
exec curl.XPOST @H = @hkey, @d = @body, @url = @endpoint
```;
- Dominant language
- PowerShell
- Stars
- 11.2k
- Forks
- 9.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/sql-server-samples
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
microsoft/sql-server-samples#1499 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 76/100
microsoft/sql-server-samples#1495 · 3 reactions ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
microsoft/sql-server-samples#1341 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 64/100
microsoft/sql-server-samples#276 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 35/100
microsoft/sql-server-samples#1497 ·
All issues in microsoft/sql-server-samples
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
speaches-ai/speaches#678 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Openbug ecr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100