Table of Contents

Class Cookie

Namespace
Soup
Assembly
Soup-3.0.dll
public sealed class Cookie : BoxedRecord, IEquatable<Cookie>
Inheritance
Cookie
Implements
Inherited Members

Constructors

public Cookie(CookieOwnedHandle handle)

Parameters

handle CookieOwnedHandle

Properties

public CookieOwnedHandle Handle { get; }

Property Value

CookieOwnedHandle

Methods

public bool AppliesToUri(Uri uri)

Parameters

uri Uri

Returns

bool
public Cookie Copy()

Returns

Cookie
public bool DomainMatches(string host)

Parameters

host string

Returns

bool
public bool Equal(Cookie cookie2)

Parameters

cookie2 Cookie

Returns

bool

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Cookie? other)

Parameters

other Cookie

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

public void Free()
public string GetDomain()

Returns

string
public DateTime? GetExpires()

Returns

DateTime
public static Type GetGType()

Returns

Type

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

public bool GetHttpOnly()

Returns

bool
public string GetName()

Returns

string
public string GetPath()

Returns

string
public SameSitePolicy GetSameSitePolicy()

Returns

SameSitePolicy
public bool GetSecure()

Returns

bool
public string GetValue()

Returns

string
public static Cookie New(string name, string value, string domain, string path, int maxAge)

Parameters

name string
value string
domain string
path string
maxAge int

Returns

Cookie
public static Cookie? Parse(string header, Uri? origin)

Parameters

header string
origin Uri

Returns

Cookie
public void SetDomain(string domain)

Parameters

domain string
public void SetExpires(DateTime expires)

Parameters

expires DateTime
public void SetHttpOnly(bool httpOnly)

Parameters

httpOnly bool
public void SetMaxAge(int maxAge)

Parameters

maxAge int
public void SetName(string name)

Parameters

name string
public void SetPath(string path)

Parameters

path string
public void SetSameSitePolicy(SameSitePolicy policy)

Parameters

policy SameSitePolicy
public void SetSecure(bool secure)

Parameters

secure bool
public void SetValue(string value)

Parameters

value string
public string ToCookieHeader()

Returns

string
public string ToSetCookieHeader()

Returns

string