is an option for URLRead, HTTPRequest, and related functions that gives a function to apply to each cookie received when an HTTP response is received.
- CookieFunction->f applies f to the association that represents each received cookie.
- CookieFunction->Automatic is equivalent to CookieFunction->SetCookies.
- CookieFunction->None effectively blocks all cookies.
- The entries in the association for a given cookie are:
- CookieFunction is effectively applied to the "Cookies" entry in an HTTPResponse object.
Examplesopen allclose all
Basic Examples (1)
Create a function that echoes received cookies and stores them for later use:
The cookie is now stored in $Cookies:
On subsequent calls to the domain, the cookie will not be reset:
Wolfram Research (2016), CookieFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/CookieFunction.html.
Wolfram Language. 2016. "CookieFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CookieFunction.html.
Wolfram Language. (2016). CookieFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CookieFunction.html