public class Response extends Object
Modifier and Type | Method and Description |
---|---|
void |
assertOk()
Throws an IllegalStateException if not 200-level OK.
|
int |
getContentLength()
Returns content length of the response.
|
String |
getHeaderField(String field)
Returns an HTTP header field from the response.
|
Headers |
getHeaders()
Returns all HTTP headers.
|
int |
getResponseCode()
Returns the HTTP response code.
|
String |
getResponseMessage()
Returns the HTTP response message.
|
boolean |
isNotFound()
Returns true if processing returned 404.
|
boolean |
isOk()
Returns true if processing was 200-level OK.
|
protected void |
parse(ContentHandler handler)
Parses the response.
|
String |
toString()
Returns a string representation.
|
public int getResponseCode() throws IOException
IOException
public String getResponseMessage() throws IOException
IOException
public int getContentLength()
public void assertOk()
public String getHeaderField(String field)
public Headers getHeaders()
public boolean isOk()
public boolean isNotFound()
public String toString()
protected void parse(ContentHandler handler) throws IOException
IOException
Copyright © 2013. All Rights Reserved.