org.codehaus.httpcache4j
Class HTTPRequest
java.lang.Object
org.codehaus.httpcache4j.HTTPRequest
public class HTTPRequest
- extends java.lang.Object
Represents a HTTP request. You can use this in a couple of ways:
either manipulating the headers directly, or by using the convenience objects.
If you manipulate the headers, and use the convenience objects afterwards, the
headers produced by the convenience objects takes precedence.
- Author:
- Erlend Hamnaberg
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTTPRequest
public HTTPRequest(java.net.URI requestURI,
HTTPMethod method)
HTTPRequest
public HTTPRequest(HTTPRequest request)
HTTPRequest
public HTTPRequest(java.net.URI requestURI)
getRequestURI
public java.net.URI getRequestURI()
getHeaders
public Headers getHeaders()
getAllHeaders
public Headers getAllHeaders()
- Returns all headers with the headers from the Conditionals, Payload and Preferences.
If you have explicitly set headers on the request that are the same as the Conditionals and Preferences they are overwritten.
- Returns:
- All the headers
addHeader
public HTTPRequest addHeader(Header header)
addHeader
public HTTPRequest addHeader(java.lang.String name,
java.lang.String value)
getConditionals
public Conditionals getConditionals()
conditionals
public HTTPRequest conditionals(Conditionals conditionals)
getMethod
public HTTPMethod getMethod()
getPreferences
public Preferences getPreferences()
preferences
public HTTPRequest preferences(Preferences preferences)
getChallenge
public Challenge getChallenge()
challenge
public HTTPRequest challenge(Challenge challenge)
getPayload
public Payload getPayload()
payload
public HTTPRequest payload(Payload payload)
headers
public HTTPRequest headers(Headers headers)
hasPayload
public boolean hasPayload()
Copyright © 2008-2009. All Rights Reserved.