gov.llnl.babel.url.cookie
Class Http
java.lang.Object
gov.llnl.babel.url.cookie.Http
public class Http
extends java.lang.Object
static void | gleanCookies(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(URLConnection conn, CookieJar jar) - Add header information containing the relevant cookies to
the
URLConnection .
|
gleanCookies
public static void gleanCookies(HttpURLConnection conn,
CookieJar jar)
Parse cookies found in the 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.
sendCookies
public static void sendCookies(URLConnection conn,
CookieJar jar)
throws IOException
Add header information containing the relevant cookies to
the 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.