public class ApiResponse extends java.lang.Object implements Jsonable, Verifiable
Constructor and Description |
---|
ApiResponse(org.json.JSONObject json) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkHeader(java.lang.String name,
java.lang.String value)
Verifies that a header matches the expected value.
|
java.lang.String |
getBody() |
java.lang.String |
getHeader(java.lang.String name)
Case-insensitive lookup.
|
java.util.Map<java.lang.String,java.lang.String> |
getHeaders() |
java.util.Map<java.lang.String,java.lang.Object> |
getOptions() |
Status |
getStatus() |
int |
getTime() |
java.util.Map<java.lang.String,java.lang.Object> |
getValues() |
boolean |
isSuccess() |
void |
setBody(java.lang.String body) |
void |
setHeaders(java.util.Map<java.lang.String,java.lang.String> headers) |
void |
setOptions(java.util.Map<java.lang.String,java.lang.Object> options) |
void |
setStatus(Status status) |
void |
setSuccess(boolean success) |
void |
setTime(int time) |
void |
setValues(java.util.Map<java.lang.String,java.lang.Object> values) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, getJson, getJsonName
public Status getStatus()
public void setStatus(Status status)
public java.util.Map<java.lang.String,java.lang.String> getHeaders()
public void setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
public int getTime()
public void setTime(int time)
public java.lang.String getBody()
public void setBody(java.lang.String body)
public java.lang.String getHeader(java.lang.String name)
public boolean checkHeader(java.lang.String name, java.lang.String value)
public java.util.Map<java.lang.String,java.lang.Object> getOptions()
public void setOptions(java.util.Map<java.lang.String,java.lang.Object> options)
public java.util.Map<java.lang.String,java.lang.Object> getValues()
public void setValues(java.util.Map<java.lang.String,java.lang.Object> values)
public boolean isSuccess()
isSuccess
in interface Verifiable
public void setSuccess(boolean success)
Copyright © 2019 CenturyLink, Inc.