|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Session
A Latka Session is a container that manages state information over 1+ HTTP request/response pairs over 1+ HTTP servers.
Method Summary | |
---|---|
void |
addCookie(String domain,
String path,
String name,
String value)
Adds a cookie to all HTTP requests whose domain and path match (according to RFC2109). |
Request |
createRequest(String label,
URL url,
int httpMethod,
String version,
boolean followRedirects)
Creates a labeled request object, with the specified URL, HTTP Method, version, and redirect handling behavior. |
Request |
createRequest(String label,
URL url,
int httpMethod,
String version,
boolean followRedirects,
Proxy proxy)
Create a labeled request with the specified URL, HTTP method, version, and redirect handling behavior, using the given proxy for communication. |
Request |
createRequest(URL url,
int httpMethod,
Proxy proxy,
String version)
Creates a request object with the specified URL, HTTP Method, and version to be accessed via the provided proxy. |
Request |
createRequest(URL url,
int httpMethod,
String version)
Creates a request object with the specified URL, HTTP Method, and version. |
String |
getCookieValue(String name)
Returns the value of cookie name . |
Method Detail |
---|
Request createRequest(URL url, int httpMethod, String version)
url
- The URL to request of the HTTP server.httpMethod
- An integer representing the HTTP method (e.g. GET, PUT)
used to communicate with server.version
- A String representing the version of the HTTP request, i.e.
1.0 or 1.1.
Request
object representing the url
and httpMethod
Request.HTTP_METHOD_GET
,
Request.HTTP_METHOD_POST
Request createRequest(String label, URL url, int httpMethod, String version, boolean followRedirects)
label
- a name used to identify the requesturl
- The URL to request of the HTTP server.httpMethod
- An integer representing the HTTP method (e.g. GET, PUT)
used to communicate with server.version
- A String representing the version of the HTTP request, i.e.
1.0 or 1.1.followRedirects
- whether to follow HTTP redirection responses
Request
object representing the url
and httpMethod
Request.HTTP_METHOD_GET
,
Request.HTTP_METHOD_POST
Request createRequest(URL url, int httpMethod, Proxy proxy, String version)
url
- The URL to request of the HTTP server.httpMethod
- An integer representing the HTTP method (e.g. GET, PUT)
used to communicate with server.proxy
- a proxy to use during the requestversion
- A String representing the version of the HTTP request, i.e.
1.0 or 1.1.
Request
object representing the url
and httpMethod
.Request.HTTP_METHOD_GET
,
Request.HTTP_METHOD_POST
,
Proxy
Request createRequest(String label, URL url, int httpMethod, String version, boolean followRedirects, Proxy proxy)
label
- a name used to identify the requesturl
- The URL to request of the HTTP server.httpMethod
- An integer representing the HTTP method (e.g. GET, PUT)
used to communicate with server.version
- A String representing the version of the HTTP request, i.e.
1.0 or 1.1.followRedirects
- whether to follow HTTP redirection responsesproxy
- a proxy to use during the request
Request
object representing the url
and httpMethod
Request.HTTP_METHOD_GET
,
Request.HTTP_METHOD_POST
,
Proxy
void addCookie(String domain, String path, String name, String value)
domain
- the domain to which the cookie should applypath
- the path to which the cookie should applyname
- the name of the cookievalue
- the value of the cookieString getCookieValue(String name)
name
.
name
- the name of the cookie
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |