Constructor
new PartialCookie(name, value, domain)
Represents a partial cookie.
Parameters:
| Name | Type | Description | 
|---|---|---|
| name | string | The name of the cookie. | 
| value | BytesValue | The value of the cookie as an instance of BytesValue. | 
| domain | string | The domain of the cookie. | 
- Source
Methods
expiry(expiry) → {PartialCookie}
Sets the expiry for the cookie.
Parameters:
| Name | Type | Description | 
|---|---|---|
| expiry | number | The expiry time of the cookie. | 
- Source
Returns:
- The updated PartialCookie instance for chaining.
- Type:
- PartialCookie
httpOnly(httpOnly) → {PartialCookie}
Sets the httpOnly flag for the cookie.
Parameters:
| Name | Type | Description | 
|---|---|---|
| httpOnly | boolean | The value to set for the  | 
- Source
Returns:
- The updated PartialCookie instance for chaining.
- Type:
- PartialCookie
path(path) → {PartialCookie}
Sets the path for the cookie.
Parameters:
| Name | Type | Description | 
|---|---|---|
| path | string | The path for the cookie. | 
- Source
Returns:
- The updated PartialCookie instance for chaining.
- Type:
- PartialCookie
sameSite(sameSite) → {PartialCookie}
Sets the SameSite attribute for the cookie.
Parameters:
| Name | Type | Description | 
|---|---|---|
| sameSite | SameSite | The SameSite attribute value for the cookie. | 
- Source
Returns:
- The updated PartialCookie instance for chaining.
- Type:
- PartialCookie
secure(secure) → {PartialCookie}
Sets the secure flag for the cookie.
Parameters:
| Name | Type | Description | 
|---|---|---|
| secure | boolean | Indicates whether the cookie should only be sent over secure connections. | 
- Source
Returns:
- The updated PartialCookie instance for chaining.
- Type:
- PartialCookie
size(size) → {PartialCookie}
Sets the size of the cookie.
Parameters:
| Name | Type | Description | 
|---|---|---|
| size | number | The size of the cookie. | 
- Source
Returns:
- The updated PartialCookie instance for chaining.
- Type:
- PartialCookie