gov.llnl.babel.url.cookie
public class Http extends java.lang.Object
Constructor and Description |
---|
Http() |
Modifier and Type | Method and Description |
---|---|
static void |
gleanCookies(java.net.HttpURLConnection conn,
CookieJar jar)
Parse cookies found in the
Set-Cookie2
header of this Http connection and put any cookies in the given jar. |
static void |
sendCookies(java.net.URLConnection conn,
CookieJar jar)
Add header information containing the relevant cookies to
the
URLConnection . |
public static void sendCookies(java.net.URLConnection conn, CookieJar jar) throws java.io.IOException
URLConnection
. This will add all cookies from
jar
that should be sent along with conn
according to the rules stated in "Http State Management Mechanism"
dated August 27, 1999.conn
- a connection to a URL that hasn't yet connected to the
server.jar
- a collection of Cookie
's.java.io.IOException
- when there is I/O there is always the chance of an exception.public static void gleanCookies(java.net.HttpURLConnection conn, CookieJar jar)
Set-Cookie2
header of this Http connection and put any cookies in the given jar.
This method will reject any cookies that aren't valid considering the
source and the rules found in the document "HTTP State
Management Mechanism" dated August 27, 1999.