AuthenticationHeaderValue AuthenticationHeaderValue AuthenticationHeaderValue AuthenticationHeaderValue Constructors

Definition

Overloads

AuthenticationHeaderValue(String) AuthenticationHeaderValue(String) AuthenticationHeaderValue(String) AuthenticationHeaderValue(String)

Initializes a new instance of the AuthenticationHeaderValue class.

AuthenticationHeaderValue(String, String) AuthenticationHeaderValue(String, String) AuthenticationHeaderValue(String, String) AuthenticationHeaderValue(String, String)

Initializes a new instance of the AuthenticationHeaderValue class.

AuthenticationHeaderValue(String) AuthenticationHeaderValue(String) AuthenticationHeaderValue(String) AuthenticationHeaderValue(String)

Initializes a new instance of the AuthenticationHeaderValue class.

public:
 AuthenticationHeaderValue(System::String ^ scheme);
public AuthenticationHeaderValue (string scheme);
new System.Net.Http.Headers.AuthenticationHeaderValue : string -> System.Net.Http.Headers.AuthenticationHeaderValue
Public Sub New (scheme As String)

Parameters

scheme
String String String String

The scheme to use for authorization.

Remarks

Example:

HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(ACCESS_TOKEN);
Dim client = New HttpClient()
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(ACCESS_TOKEN)

Will produce the following header:

Authorization: ACCESS_TOKEN

AuthenticationHeaderValue(String, String) AuthenticationHeaderValue(String, String) AuthenticationHeaderValue(String, String) AuthenticationHeaderValue(String, String)

Initializes a new instance of the AuthenticationHeaderValue class.

public:
 AuthenticationHeaderValue(System::String ^ scheme, System::String ^ parameter);
public AuthenticationHeaderValue (string scheme, string parameter);
new System.Net.Http.Headers.AuthenticationHeaderValue : string * string -> System.Net.Http.Headers.AuthenticationHeaderValue
Public Sub New (scheme As String, parameter As String)

Parameters

scheme
String String String String

The scheme to use for authorization.

parameter
String String String String

The credentials containing the authentication information of the user agent for the resource being requested.

Remarks

Example:

HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", ACCESS_TOKEN);
Dim client = new HttpClient()
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", ACCESS_TOKEN)

Will produce the following header:

Authorization: Bearer ACCESS_TOKEN

Applies to