Skip to content

libcURL.HTTPAuthMethods

Andrew Lambert edited this page Jan 31, 2024 · 14 revisions

libcURL.HTTPAuthMethods

Class Declaration

 Protected Class HTTPAuthMethods

Remarks

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.

Methods

Properties

See also

Clone this wiki locally