Table of Contents

Class HttpCredentials

Namespace
Microsoft.Playwright
Assembly
Microsoft.Playwright.dll
public class HttpCredentials
Inheritance
HttpCredentials
Inherited Members

Constructors

HttpCredentials()

public HttpCredentials()

Properties

Origin

Restrain sending http credentials on specific origin (scheme://host:port).

[JsonPropertyName("origin")]
public string? Origin { get; set; }

Property Value

string

Password

[Required]
[JsonPropertyName("password")]
public string Password { get; set; }

Property Value

string

Send

This option only applies to the requests sent from corresponding IAPIRequestContext and does not affect requests sent from the browser. 'always' - Authorization header with basic authentication credentials will be sent with the each API request. 'unauthorized - the credentials are only sent when 401 (Unauthorized) response with WWW-Authenticate header is received. Defaults to 'unauthorized'.

[JsonPropertyName("send")]
public HttpCredentialsSend? Send { get; set; }

Property Value

HttpCredentialsSend?

Username

[Required]
[JsonPropertyName("username")]
public string Username { get; set; }

Property Value

string