Class Cookie
- Namespace
- WebDriverBiDi.Network
- Assembly
- WebDriverBiDi.dll
Represents a cookie in a web request or response.
public record Cookie : IEquatable<Cookie>
- Inheritance
-
Cookie
- Implements
- Inherited Members
Constructors
Cookie(Cookie)
protected Cookie(Cookie original)
Parameters
originalCookie
Properties
AdditionalData
Gets the read-only dictionary containing extra data returned for this cookie.
[JsonIgnore]
public ReceivedDataDictionary AdditionalData { get; }
Property Value
Domain
Gets the domain of the cookie.
[JsonPropertyName("domain")]
[JsonRequired]
[JsonInclude]
public string Domain { get; }
Property Value
EpochExpires
Gets the expiration time of the cookie as the total number of seconds elapsed since the start of the Unix epoch (1 January 1970 12:00AM UTC).
[JsonPropertyName("expiry")]
[JsonInclude]
public ulong? EpochExpires { get; }
Property Value
EqualityContract
protected virtual Type EqualityContract { get; }
Property Value
Expires
Gets the expiration time of the cookie. An EpochExpires value too large to be represented by a DateTime is clamped to MaxValue. The value's Kind is always Utc, including when it is clamped.
[JsonIgnore]
public DateTime? Expires { get; }
Property Value
HttpOnly
Gets a value indicating whether the cookie is only available via HTTP headers (true), or if the cookie can be inspected and manipulated via JavaScript (false).
[JsonPropertyName("httpOnly")]
[JsonRequired]
[JsonInclude]
public bool HttpOnly { get; }
Property Value
Name
Gets the name of the cookie.
[JsonPropertyName("name")]
[JsonRequired]
[JsonInclude]
public string Name { get; }
Property Value
Path
Gets the path of the cookie.
[JsonPropertyName("path")]
[JsonRequired]
[JsonInclude]
public string Path { get; }
Property Value
SameSite
Gets a value indicating whether the cookie is a same-site cookie.
[JsonPropertyName("sameSite")]
[JsonRequired]
[JsonInclude]
public CookieSameSiteValue SameSite { get; }
Property Value
Secure
Gets a value indicating whether the cookie is secure, delivered via an encrypted connection like HTTPS.
[JsonPropertyName("secure")]
[JsonRequired]
[JsonInclude]
public bool Secure { get; }
Property Value
Size
Gets the byte length of the cookie when serialized in an HTTP cookie header.
[JsonPropertyName("size")]
[JsonRequired]
[JsonInclude]
public ulong Size { get; }
Property Value
Value
Gets the value of the cookie.
[JsonPropertyName("value")]
[JsonRequired]
[JsonInclude]
public BytesValue Value { get; }
Property Value
Methods
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(Cookie?)
public virtual bool Equals(Cookie? other)
Parameters
otherCookie
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected virtual bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToSetCookieHeader()
Converts this cookie to a SetCookieHeader.
public SetCookieHeader ToSetCookieHeader()
Returns
- SetCookieHeader
The SetCookieHeader representing this cookie.
ToString()
public override string ToString()
Returns
Operators
operator ==(Cookie?, Cookie?)
public static bool operator ==(Cookie? left, Cookie? right)
Parameters
Returns
operator !=(Cookie?, Cookie?)
public static bool operator !=(Cookie? left, Cookie? right)