public class Response extends Object
Constructor and Description |
---|
Response(int code,
String message,
Map<String,String> headers,
String body,
InputStream stream) |
Modifier and Type | Method and Description |
---|---|
String |
getBody()
Obtains the HTTP Response body
|
int |
getCode()
Obtains the HTTP status code
|
String |
getHeader(String name)
Obtains a single HTTP Header value, or null if undefined
|
Map<String,String> |
getHeaders()
Obtains a
Map containing the HTTP Response Headers |
String |
getMessage()
Obtains the HTTP status message.
|
boolean |
isSuccessful() |
String |
toString() |
public final boolean isSuccessful()
public String getBody()
public final int getCode()
public String getMessage()
null
if the message can not be discerned from the response (not valid HTTP)public Map<String,String> getHeaders()
Map
containing the HTTP Response Headerspublic String getHeader(String name)
name
- the header name.Copyright © 2015. All rights reserved.