request.cookies()
Access:
public

This is the cookies class. With this class you can get the cookies that were sent by the client.

Summary

Name
Description
get
Returns the specified cookie.
has
Checks if the cookie exists.
Returns an array of all the cookies.

Functions

.get()
Access:
public
Summary:
Returns the specified cookie.

With this function you can get a certain cookie that has been sent by the client. You specify the cookie you want to get using the key parameter. If the key parameter isn't a string it'll throw a TypeError and when the cookie wasn't found it'll return undefined.

Returns

Type
String
Description
The specified cookie.
.has()
Access:
public
Summary:
Checks if the cookie exists.

This function returns if the client has sent the specified cookie. You can specify the cookie you want to check using the key parameter. If the key parameter isn't a string it'll throw a TypeError.

Returns

Type
Boolean
Description
If the cookie exists.
.list()
Access:
public
Summary:
Returns an array of all the cookies.

This function returns an array of the names of all the cookies that were sent by the client.

Returns

Type
String[]
Description
An array of all the cookies.