| 构造器和说明 |
|---|
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(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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic void delete(String name)
name - The cookie name.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 © 2020. All rights reserved.