public static class ServerContext.ServerContextResult
extends java.lang.Object
Server
.getContentType()
returns \"text/plain; charset=utf-8\" by
default.Constructor and Description |
---|
ServerContextResult(java.lang.String response,
java.lang.String statusCode)
Constructor using a HTTP status code and a response text.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentType()
Returns HTTP-header content type.
|
java.lang.String |
getResponse()
Returns the response text.
|
java.lang.String |
getStatusCode()
Returns the result status code.
|
void |
setContentType(java.lang.String contentType)
Sets the HTTP-header 'Content-Type' property.
|
public ServerContextResult(java.lang.String response, java.lang.String statusCode)
response
- The response text.statusCode
- The response HTTP status code.public java.lang.String getResponse()
public java.lang.String getStatusCode()
public void setContentType(java.lang.String contentType)
contentType
- The content type String to set.public java.lang.String getContentType()