| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultRequest.DefaultRequestBuilder |
Request.Builder, Request.Method| Modifier and Type | Method and Description |
|---|---|
static DefaultRequest.DefaultRequestBuilder |
builder(HttpClient httpClient) |
String |
getAccept()
Returns this request's Accept header, if set.
|
String |
getAttribute(String name)
Gets an attribute from the request.
|
Map<String,String> |
getAttributes()
Gets all attributes for this request.
|
String |
getContentCharset()
Returns the currently set content charset value, if any.
|
com.atlassian.fugue.Option<Long> |
getContentLength()
Returns the content length for the entity in the message.
|
String |
getContentType()
Returns the IANA media type, minus charset information, for the current entity, if any.
|
String |
getEntity()
Returns the current entity in
String form, if available, converting the underlying
entity stream to a string using the currently set content charset, or defaulting to the HTTP
standard of "ISO-8859-1" if no content charset has been specified. |
InputStream |
getEntityStream()
Returns the current entity as an input stream, or null if not set.
|
String |
getHeader(String name)
Returns the specified header by name.
|
Map<String,String> |
getHeaders()
Returns a map of all headers that have been set on this object.
|
Request.Method |
getMethod() |
URI |
getUri()
Returns this request's URI, if set.
|
boolean |
hasEntity()
Returns whether or not an entity has been set on this object.
|
boolean |
hasReadEntity()
Returns whether or not the current entity property, if any, has been read from this object.
|
boolean |
isCacheDisabled() |
Request |
validate() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContentCharset, getContentType, getEntity, getEntityStream, getHeader, getHeaders, hasEntity, hasReadEntitypublic static DefaultRequest.DefaultRequestBuilder builder(HttpClient httpClient)
public Request.Method getMethod()
public URI getUri()
Requestpublic String getAccept()
Requestpublic String getAttribute(String name)
RequestgetAttribute in interface Requestname - The attribute namepublic Map<String,String> getAttributes()
RequestgetAttributes in interface Requestpublic com.atlassian.fugue.Option<Long> getContentLength()
MessagegetContentLength in interface Messagepublic boolean isCacheDisabled()
isCacheDisabled in interface Requestpublic Request validate()
public String getContentType()
MessagegetContentCharset(). To get the full
Content-Type header value including charset if specified, use getHeader("Content-Type").getContentType in interface Messagepublic String getContentCharset()
MessagegetContentCharset in interface Messagepublic InputStream getEntityStream() throws IllegalStateException
MessagehasEntity()
to check if this message has an entity value.getEntityStream in interface MessageIllegalStateException - If the non-null entity has already been accessed once, through
any accessor for this objectpublic String getEntity() throws IllegalStateException, IllegalArgumentException
MessageString form, if available, converting the underlying
entity stream to a string using the currently set content charset, or defaulting to the HTTP
standard of "ISO-8859-1" if no content charset has been specified.getEntity in interface MessageIllegalStateException - If the non-null entity has already been accessed once, through
any accessor for this object. Also thrown if underlying body cannot be converted into a StringIllegalArgumentException - If the entity exceeds the maximum sizepublic boolean hasEntity()
MessagehasReadEntity() state.public boolean hasReadEntity()
MessageIllegalStateException being thrown.hasReadEntity in interface Messagepublic Map<String,String> getHeaders()
MessagegetHeaders in interface MessageCopyright © 2012–2018 Atlassian. All rights reserved.