public class Response extends Object
| Modifier and Type | Field and Description |
|---|---|
protected HttpURLConnection |
conn |
protected String |
content |
protected boolean |
isGzip |
protected boolean |
storeContent |
| Modifier | Constructor and Description |
|---|---|
protected |
Response(HttpURLConnection conn,
boolean isGzip,
boolean storeContent) |
| Modifier and Type | Method and Description |
|---|---|
String |
content() |
Map<String,String> |
cookies() |
String |
error() |
HttpURLConnection |
getConnection() |
String |
header(String key) |
Map<String,List<String>> |
headers() |
List<String> |
headers(String key) |
boolean |
isClientError() |
boolean |
isInformational() |
boolean |
isRedirection() |
boolean |
isServerError() |
boolean |
isSuccess() |
String |
location() |
int |
status() |
protected final HttpURLConnection conn
protected final boolean isGzip
protected String content
protected boolean storeContent
protected Response(HttpURLConnection conn, boolean isGzip, boolean storeContent)
public String content() throws IOException
IOExceptionpublic String error() throws IOException
IOExceptionpublic int status()
throws IOException
IOExceptionpublic HttpURLConnection getConnection()
public String location()
public boolean isInformational()
throws IOException
IOExceptionpublic boolean isSuccess()
throws IOException
IOExceptionpublic boolean isRedirection()
throws IOException
IOExceptionpublic boolean isClientError()
throws IOException
IOExceptionpublic boolean isServerError()
throws IOException
IOExceptionCopyright © 2018. All rights reserved.