Node Director
|
Provides rudimentary support for cookies. More...
Public Member Functions | |
CookieHandler (Map< String, String > httpHeaders) | |
void | delete (String name) |
Set a cookie with an expiration date from a month ago, effectively deleting it on the client side. | |
Iterator< String > | iterator () |
String | read (String name) |
Read a cookie from the HTTP Headers. | |
void | set (Cookie cookie) |
void | set (String name, String value, int expires) |
Sets a cookie. | |
void | unloadQueue (Response response) |
Internally used by the webserver to add all queued cookies into the Response's HTTP Headers. |
Provides rudimentary support for cookies.
Doesn't support 'path', 'secure' nor 'httpOnly'. Feel free to improve it and/or add unsupported features.
fi.iki.elonen.NanoHTTPD.CookieHandler.CookieHandler | ( | Map< String, String > | httpHeaders | ) |
void fi.iki.elonen.NanoHTTPD.CookieHandler.delete | ( | String | name | ) |
Set a cookie with an expiration date from a month ago, effectively deleting it on the client side.
name | The cookie name. |
Iterator<String> fi.iki.elonen.NanoHTTPD.CookieHandler.iterator | ( | ) |
String fi.iki.elonen.NanoHTTPD.CookieHandler.read | ( | String | name | ) |
Read a cookie from the HTTP Headers.
name | The cookie's name. |
void fi.iki.elonen.NanoHTTPD.CookieHandler.set | ( | Cookie | cookie | ) |
void fi.iki.elonen.NanoHTTPD.CookieHandler.set | ( | String | name, |
String | value, | ||
int | expires | ||
) |
Sets a cookie.
name | The cookie's name. |
value | The cookie's value. |
expires | How many days until the cookie expires. |
void fi.iki.elonen.NanoHTTPD.CookieHandler.unloadQueue | ( | Response | response | ) |
Internally used by the webserver to add all queued cookies into the Response's HTTP Headers.
response | The Response object to which headers the queued cookies will be added. |
Referenced by fi.iki.elonen.NanoHTTPD.HTTPSession.execute().