Object -
http
:
CookieStore
Represents the cookie store.
Methods
Adds a cookie to the cookie store according to the rules in RFC-6265.
Adds an array of cookies.
Gets the relevant cookies for the given URL and the path according to the rules in RFC-6265.
Gets all the cookies in the cookie store.
Removes a specific cookie.
Removes all the cookies.
Adds a cookie to the cookie store according to the rules in RFC-6265.
Parameters
- cookie Cookie
-
Cookie to be added
- cookieConfig CookieConfig
-
Configurations associated with the cookies
- url string
-
Target service URL
- requestPath string
-
Resource path
Adds an array of cookies.
Parameters
- cookiesInResponse Cookie[]
-
Cookies to be added
- cookieConfig CookieConfig
-
Configurations associated with the cookies
- url string
-
Target service URL
- requestPath string
-
Resource path
Gets the relevant cookies for the given URL and the path according to the rules in RFC-6265.
Parameters
- url string
-
URL of the request URI
- requestPath string
-
Path of the request URI
-
Return Type
(Cookie[]) Array of the matched cookies stored in the cookie store
Gets all the cookies in the cookie store.
-
Return Type
(Cookie[]) Array of all the cookie objects
Removes a specific cookie.
Parameters
- name string
-
Name of the cookie to be removed
- domain string
-
Domain of the cookie to be removed
- path string
-
Path of the cookie to be removed
-
Return Type
(boolean) Return true if the relevant cookie is removed, false otherwise