public final class Response extends Object
Contains the basic details of an HTTP response received from the Brightpearl API. Client implementations must
return instances with all properties set, except when the HTTP request fails with a transport error, in which case
a BrightpearlHttpException should be thrown.
Instances are immutable and may be constructed using ResponseBuilder.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getBody()
Returns the JSON response body.
|
String |
getHeader(String key)
A utility method that looks up the value of a named header.
|
Map<String,String> |
getHeaders()
Returns the response headers.
|
int |
getStatus()
Returns the HTTP status of the response.
|
long |
getTimestamp()
Returns the timestamp this response instance was created.
|
int |
hashCode() |
String |
toString() |
public int getStatus()
public Map<String,String> getHeaders()
public String getBody()
public long getTimestamp()
public String getHeader(String key)
key - Header name to look up.Copyright © 2014. All Rights Reserved.