Connection.Base<Connection.Response>
HttpConnection.Response
public static interface Connection.Response extends Connection.Base<Connection.Response>
Modifier and Type | Method | Description |
---|---|---|
String |
body() |
Get the body of the response as a plain string.
|
byte[] |
bodyAsBytes() |
Get the body of the response as an array of bytes.
|
String |
charset() |
Get the character set name of the response, derived from the content-type header.
|
Connection.Response |
charset(String charset) |
Set / override the response character set.
|
String |
contentType() |
Get the response content type (e.g.
|
Document |
parse() |
Parse the body of the response as a Document.
|
int |
statusCode() |
Get the status code of the response.
|
String |
statusMessage() |
Get the status message of the response.
|
cookie, cookie, cookies, hasCookie, hasHeader, hasHeaderWithValue, header, header, headers, method, method, removeCookie, removeHeader, url, url
int statusCode()
String statusMessage()
String charset()
Connection.Response charset(String charset)
charset
- to decode body asString contentType()
Document parse() throws IOException
IOException
- on errorString body()
byte[] bodyAsBytes()
Copyright © 2009–2018 Jonathan Hedley. All rights reserved.