public class NanoHTTPD.CookieHandler extends Object implements Iterable
Constructor and Description |
---|
NanoHTTPD.CookieHandler(Map |
Modifier and Type | Method and Description |
---|---|
void |
delete(String name)
Set a cookie with an expiration date from a month ago, effectively deleting it on the client side.
|
Iterator |
iterator() |
String |
read(String name)
Read a cookie from the HTTP Headers.
|
void |
set(NanoHTTPD.Cookie cookie) |
void |
set(String name, String value, int expires)
Sets a cookie.
|
void |
unloadQueue(NanoHTTPD.Response response)
Internally used by the webserver to add all queued cookies into the Response's HTTP Headers.
|
public void delete(String name)
name
- The cookie name.public Iteratoriterator()
iterator
in interface Iterable
public String read(String name)
name
- The cookie's name.public void set(NanoHTTPD.Cookie cookie)
public void set(String name, String value, int expires)
name
- The cookie's name.value
- The cookie's value.expires
- How many days until the cookie expires.public void unloadQueue(NanoHTTPD.Response response)
response
- The Response object to which headers the queued cookies will be added.Copyright © 2012–2016 nanohttpd. All rights reserved.