public class CookieHandler extends CookieHandler
Constructor and Description |
---|
CookieHandler() |
Modifier and Type | Method and Description |
---|---|
Map<String,List<String>> |
get(URI uri,
Map<String,List<String>> map)
Gets all the applicable cookies from a cookie cache for the
specified uri in the request header.
|
void |
put(URI uri,
Map<String,List<String>> responseHeaders)
Sets all the applicable cookies, examples are response header
fields that are named Set-Cookie2, present in the response
headers into a cookie cache.
|
getDefault, setDefault
public Map<String,List<String>> get(URI uri, Map<String,List<String>> map)
get
in class CookieHandler
uri
- a URI
to send cookies to in a requestmap
- - a Map from request header
field names to lists of field values representing
the current request headersIllegalArgumentException
- if either argument is nullput(URI, Map)
,
CookieHandler.get(java.net.URI, java.util.Map)
public void put(URI uri, Map<String,List<String>> responseHeaders)
put
in class CookieHandler
uri
- a URI
where the cookies come fromresponseHeaders
- an immutable responseHeaders from field names to
lists of field values representing the response
header fields returnedIllegalArgumentException
- if either argument is nullget(URI, Map)