OAuthHeader
Associates an OAuth Authentication HTTP Request Header with an HTTP Session
- Stored Procedure
- SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017
EXEC SQLHTTP.net.OAuthHeader @HttpSessionID, @URL, @Method, @ConsumerKey, @ConsumerSecret, @Token, @TokenSecret
Name | Type | Description |
---|---|---|
@HttpSessionID | uniqueidentifier | This value is obtained via the HttpSession stored procedure |
@URL | nvarchar(4000) | Web address starting with either http:\\ or https:\\ |
@Method | varchar(10) | The request method, such as GET or POST, to use to contact the URL |
@ConsumerKey | nvarchar(4000) | The Consumer Key generated by the RESTful web service API provider |
@ConsumerSecret | nvarchar(4000) | The Consumer Secret generated by the RESTful web service API provider |
@Token | nvarchar(4000) | The Token generated by the RESTful web service API provider |
@TokenSecret | nvarchar(4000) | The Token Secret generated by the RESTful web service API provider |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
DECLARE @HttpSessionID uniqueidentifier DECLARE @URL nvarchar(4000) DECLARE @ConsumerKey nvarchar(4000) DECLARE @ConsumerSecret nvarchar(4000) DECLARE @Token nvarchar(4000) DECLARE @TokenSecret nvarchar(4000) DECLARE @OAuthHeader nvarchar(MAX) SET @ConsumerKey = 'enter your ConsumerKey here' SET @ConsumerSecret = 'enter your ConsumerSecret here' SET @Token = 'enter your Token here' SET @TokenSecret = 'enter your TokenSecret here' SET @URL = 'enter URL for the RESTful API' EXEC SQLHTTP.net.HttpSession @HttpSessionID OUTPUT EXEC SQLHTTP.net.OAuthHeader @HttpSessionID, @URL, 'GET', --Method @ConsumerKey, @ConsumerSecret, @Token, @TokenSecret |
- AuthListener
- AuthParam
- AuthParamRemove
- AuthParamsClear
- AuthParamSet
- BasicAuthHeader
- FormDataBuilder
- HttpQueueActivity
- HttpRequest
- HttpSession
- IsUrlValid
- OAuthHeader
- QueryStringBuilder
- RaiseHttpError
- RequestHeaderRemove
- RequestHeaders
- RequestHeaderSet
- RequestPartAdd
- ResponseHeaders
- UrlBuilder
- UrlProperty