AuthenticationHeaderValue AuthenticationHeaderValue AuthenticationHeaderValue AuthenticationHeaderValue Constructors

Definición

Sobrecargas

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

Inicializa una nueva instancia de la clase AuthenticationHeaderValue.Initializes a new instance of the AuthenticationHeaderValue class.

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

Inicializa una nueva instancia de la clase AuthenticationHeaderValue.Initializes a new instance of the AuthenticationHeaderValue class.

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

Inicializa una nueva instancia de la clase AuthenticationHeaderValue.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)

Parámetros

scheme
String String String String

Esquema que se utilizará para la autorización.The scheme to use for authorization.

Comentarios

Ejemplo:Example:

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

Se producirá el siguiente encabezado:Will produce the following header:

Authorization: ACCESS_TOKEN

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

Inicializa una nueva instancia de la clase AuthenticationHeaderValue.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)

Parámetros

scheme
String String String String

Esquema que se utilizará para la autorización.The scheme to use for authorization.

parameter
String String String String

Credenciales que contienen la información de autenticación del agente de usuario para el recurso que se está solicitando.The credentials containing the authentication information of the user agent for the resource being requested.

Comentarios

Ejemplo: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)

Se producirá el siguiente encabezado:Will produce the following header:

Authorization: Bearer ACCESS_TOKEN

Se aplica a