public static interface BasicHTTPService.Response
Modifier and Type | Method | Description |
---|---|---|
net.sergeych.tools.Binder |
getHeaders() |
Get mutable headers object.
|
void |
setBody(byte[] bodyAsBytes) |
Set the body to specific value.
|
void |
setBody(java.lang.String bodyAsString) |
Set the body to specific value.
|
void |
setResponseCode(int code) |
Set the HTTP response code to specific value.
|
net.sergeych.tools.Binder getHeaders()
void setBody(java.lang.String bodyAsString)
bodyAsString
- body in the form of String. Must return in UTF-8 encoding and set appropriate headers.
if the mime-type header was not set, set it to application/textvoid setBody(byte[] bodyAsBytes)
bodyAsBytes
- body in the form of byte array.
if the mime-type header was not set, set it to application/octet-streamvoid setResponseCode(int code)
code
- is int representation of HTTP response