HttpSession
Initiates a new HTTP Session
- Stored Procedure
- SQL Server Compatibility: 2008, 2012, 2014, 2016, 2017
EXEC SQLHTTP.net.HttpSession @HttpSessionID OUTPUT, [@UserAgent], [@MaxInactiveDuration]
Name | Type | Description |
---|---|---|
@HttpSessionID | uniqueidentifier | Output parameter to be used in other stored procedures |
@UserAgent | nvarchar(4000) | Optional. A User Agent to be used. See the UserAgents Table for a list of user agents. If not specified, the default value is obtained from the Defaults Table |
@MaxInactiveDuration | int | Optional. The number of minutes to maintain a session before related information is removed from the SQLHTTP database. If not specified, the default value is obtained from the Defaults Table |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
DECLARE @URL nvarchar(4000) DECLARE @HttpSessionID uniqueidentifier DECLARE @Response varchar(MAX) SET @URL = 'enter URL/URI here' EXEC SQLHTTP.net.HttpSession @HttpSessionID OUTPUT EXEC SQLHTTP.net.HttpRequest @HttpSessionID, @URL = @URL, @Response = @Response OUTPUT |
- AuthListener
- AuthParam
- AuthParamRemove
- AuthParamsClear
- AuthParamSet
- BasicAuthHeader
- FormDataBuilder
- HttpQueueActivity
- HttpRequest
- HttpSession
- IsUrlValid
- OAuthHeader
- QueryStringBuilder
- RaiseHttpError
- RequestHeaderRemove
- RequestHeaders
- RequestHeaderSet
- RequestPartAdd
- ResponseHeaders
- UrlBuilder
- UrlProperty