# Cookie

Namespace: **Wisej.Base**

Assembly: **Wisej.Framework** (3.0.0.0)

Represents an individual HTTP cookie.

{% tabs %}
{% tab title="C#" %}

```csharp
public class Cookie
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class Cookie
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Cookie()

Creates a new instance of [Cookie](https://docs.wisej.com/api/v3.0/wisej.base/general/cookie).

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Cookie(name, value)

Creates a new instance of [Cookie](https://docs.wisej.com/api/v3.0/wisej.base/general/cookie).

| Name      | Type                                                                | Description              |
| --------- | ------------------------------------------------------------------- | ------------------------ |
| **name**  | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | The name of the cookie.  |
| **value** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | The value of the cookie. |

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Cookie(name, value, domain)

Creates a new instance of [Cookie](https://docs.wisej.com/api/v3.0/wisej.base/general/cookie).

| Name       | Type                                                                | Description                                                |
| ---------- | ------------------------------------------------------------------- | ---------------------------------------------------------- |
| **name**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | The name of the cookie.                                    |
| **value**  | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | The value of the cookie.                                   |
| **domain** | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string) | The domain, or partial domain, associated with the cookie. |

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Cookie(name, value, expires)

Creates a new instance of [Cookie](https://docs.wisej.com/api/v3.0/wisej.base/general/cookie).

| Name        | Type                                                                    | Description                             |
| ----------- | ----------------------------------------------------------------------- | --------------------------------------- |
| **name**    | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)     | The name of the cookie.                 |
| **value**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)     | The value of the cookie.                |
| **expires** | [DateTime](https://docs.microsoft.com/en-us/dotnet/api/system.datetime) | The expiration date/time of the cookie. |

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Cookie(name, value, domain, expires)

Creates a new instance of [Cookie](https://docs.wisej.com/api/v3.0/wisej.base/general/cookie).

| Name        | Type                                                                    | Description                                                |
| ----------- | ----------------------------------------------------------------------- | ---------------------------------------------------------- |
| **name**    | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)     | The name of the cookie.                                    |
| **value**   | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)     | The value of the cookie.                                   |
| **domain**  | [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)     | The domain, or partial domain, associated with the cookie. |
| **expires** | [DateTime](https://docs.microsoft.com/en-us/dotnet/api/system.datetime) | The expiration date/time of the cookie.                    |

## Properties

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Domain

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the domain to associate the cookie with.

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Expires

[DateTime](https://docs.microsoft.com/en-us/dotnet/api/system.datetime): Returns or sets the expiration date and time for the cookie.

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Name

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the name for the [Cookie](https://docs.wisej.com/api/v3.0/wisej.base/general/cookie).

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Path

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets the path of the [Cookie](https://docs.wisej.com/api/v3.0/wisej.base/general/cookie).

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)SameSite

[SameSiteMode](https://docs.wisej.com/api/v3.0/wisej.base/general/cookie/wisej.base.cookie.samesitemode): Returns or sets the value for the SameSite attribute of the cookie. The default value is [Unspecified](https://docs.wisej.com/api/v3.0/wisej.base/general/wisej.base.cookie.samesitemode#fields).

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Secure

[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean): Returns or sets whether to transmit the cookie using Secure Sockets Layer (SSL)--that is, over HTTPS only.

### ![](https://2647619304-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHOivImCoV8KSJbQyp6QI%2Fuploads%2Fgit-blob-2389c55cd19719a73a5ae98e1528c8dc8525cc35%2Finstance.png?alt=media)Value

[String](https://docs.microsoft.com/en-us/dotnet/api/system.string): Returns or sets an individual cookie value.
