|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Response
Represents the asynchronous HTTP response callback for an AsyncCompletionHandler
Method Summary | |
---|---|
String |
getContentType()
Return the content-type header value. |
List<Cookie> |
getCookies()
Return the list of Cookie . |
String |
getHeader(String name)
Return the response header |
FluentCaseInsensitiveStringsMap |
getHeaders()
|
List<String> |
getHeaders(String name)
Return a List of the response header value. |
String |
getResponseBody()
Return the entire response body as a String. |
InputStream |
getResponseBodyAsStream()
Returns an input stream for the response body. |
String |
getResponseBodyExcerpt(int maxLength)
Returns the first maxLength bytes of the response body as a string. |
int |
getStatusCode()
Returns the status code for the request. |
String |
getStatusText()
Returns the status text for the request. |
URI |
getUri()
Return the request URI . |
boolean |
isRedirected()
Return true if the response redirects to another object. |
String |
toString()
Subclasses SHOULD implement toString() in a way that identifies the request for logging. |
Method Detail |
---|
int getStatusCode()
String getStatusText()
InputStream getResponseBodyAsStream() throws IOException
IOException
String getResponseBodyExcerpt(int maxLength) throws IOException
maxLength
- The maximum number of bytes to read
IOException
String getResponseBody() throws IOException
IOException
URI getUri() throws MalformedURLException
URI
. Note that if the request got redirected, the value of the URI
will be
the last valid redirect url.
URI
.
MalformedURLException
String getContentType()
String getHeader(String name)
List<String> getHeaders(String name)
List
of the response header value.
FluentCaseInsensitiveStringsMap getHeaders()
boolean isRedirected()
String toString()
toString
in class Object
List<Cookie> getCookies()
Cookie
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |