public class ClientResponse extends Object
| Constructor and Description |
|---|
ClientResponse(String data,
String contentType,
int statusCode,
String reasonPhrase)
Constructs and initializes a new ClientResponse object.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType()
Returns the content type of the response message.
|
String |
getData()
Returns the payload of the response message.
|
String |
getReasonPhrase()
Returns the reason phrase of this response.
|
int |
getStatusCode()
Returns the HTTP status code of the response message.
|
void |
setContentType(String contentType)
Sets the content type of the response message.
|
void |
setData(String data)
Sets the payload of the response message.
|
void |
setReasonPhrase(String reasonPhrase)
Updates this response with a new reason phrase.
|
void |
setStatusCode(int statusCode)
Updates the status line of this response with a new status code.
|
public ClientResponse(String data, String contentType, int statusCode, String reasonPhrase)
data - response payloadcontentType - response content typestatusCode - HTTP status code of the responsereasonPhrase - reason phrase of this responsepublic String getData()
public void setData(String data)
data - new valuepublic String getContentType()
public void setContentType(String contentType)
contentType - new valuepublic int getStatusCode()
public void setStatusCode(int statusCode)
statusCode - new valuepublic String getReasonPhrase()
public void setReasonPhrase(String reasonPhrase)
reasonPhrase - new valueCopyright © 2014–2017. All rights reserved.