-
-
Notifications
You must be signed in to change notification settings - Fork 11
libcURL.HTTPAuthMethods
libcURL.HTTPAuthMethods
Protected Class HTTPAuthMethods
This class represents a bitmask of available or permitted HTTP and proxy authentication methods. You can enable and disable individual authentication methods by assigning True or False to the corresponding class property. Enabling or disabling an authentication method sets or clears the corresponding bit in the value returned from the Mask() method.
This class cannot be instantiated using the New keyword. You must assign an integer or CURLAUTH value to a reference to create a new instance.
Set the authentication method before a request:
Dim curl As New cURLClient
curl.HTTPAuthenticationMethod = libcURL.CURLAUTH.BEARER
curl.HTTPAuthenticationMethod.Digest = True
Or, get the available authentication methods after a failed request:
Dim curl As New cURLClient
If Not curl.Get("https://private.example.com/file.txt") Then
Dim availmethods As libcURL.HTTPAuthMethods = curl.HTTPAuthenticationMethod
End If
You may also pass this class directly to EasyHandle.SetOption or cURLSession.SetOption.
Wiki home | Project page | Bugs | Become a sponsor
Text and code examples are Copyright ©2014-24 Andrew Lambert, offered under the CC BY-SA 3.0 License.