public class WLResponse
extends java.lang.Object
Constructor and Description |
---|
WLResponse(Response httpResponse) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFirstHeader(java.lang.String headerName)
Returns the first header from the response that matches the given header name.
|
java.util.List<java.lang.String> |
getHeader(java.lang.String text) |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getHeaders() |
java.lang.Object |
getInvocationContext()
Retrieves the invocation context object that is passed when the
WLClient.invokeProcedure(WLProcedureInvocationData, WLResponseListener) method is called. |
WLRequestOptions |
getOptions() |
byte[] |
getResponseBytes()
Retrieves the original response from the server, in the form of an array of bytes.
|
JSONObject |
getResponseJSON() |
java.lang.String |
getResponseText()
Retrieves the original response text from the server.
|
int |
getStatus()
Retrieves the HTTP status from the response.
|
java.lang.String |
getStatusText() |
void |
setOptions(WLRequestOptions wlOptions) |
void |
setResponseText(java.lang.String _responseText) |
void |
setStatusText(java.lang.String statusText) |
java.lang.String |
toString() |
public int getStatus()
public java.lang.Object getInvocationContext()
WLClient.invokeProcedure(WLProcedureInvocationData, WLResponseListener)
method is called.
If this response did not originate from a procedure invocation, null is returned.
public byte[] getResponseBytes()
public java.lang.String getResponseText()
public void setResponseText(java.lang.String _responseText)
_responseText
- public WLRequestOptions getOptions()
public void setOptions(WLRequestOptions wlOptions)
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()
public java.util.List<java.lang.String> getHeader(java.lang.String text)
public java.lang.String getFirstHeader(java.lang.String headerName)
headerName
- Name of header to search forpublic JSONObject getResponseJSON()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getStatusText()
public void setStatusText(java.lang.String statusText)