public class Response extends Object
Constructor and Description |
---|
Response(int responseCode,
String responseMessage,
Map<String,List<String>> responseHeaders,
String responseBody,
String latestUrl) |
Modifier and Type | Method and Description |
---|---|
String |
getHeader(String name)
For easy access to some header value that (usually) don't repeat itself.
|
String |
latestUrl()
Used for detecting a possible redirection, limited to the latest one.
|
String |
responseBody() |
int |
responseCode() |
Map<String,List<String>> |
responseHeaders() |
String |
responseMessage() |
public int responseCode()
public String responseMessage()
@Nonnull public String latestUrl()
@Nullable public String getHeader(String name)
For getting all the values associated to the header, use responseHeaders()
(e.g.
Set-Cookie
).
name
- the name of the header