| Package | Description |
|---|---|
| org.rapidoid.http |
| Modifier and Type | Method and Description |
|---|---|
Resp |
Resp.binary(Object content)
Sets the
Content-Type: application/octet-stream header and the content of the HTTP response. |
Resp |
Resp.body(byte[] body)
Sets the raw body data as
byte[] that is copied into the HTTP response body when it is
rendered. |
Resp |
Resp.body(ByteBuffer body)
Sets the raw body data as
ByteBuffer that is copied into the HTTP response body when it is
rendered. |
Resp |
Resp.code(int code)
Sets the status code (e.g.
|
Resp |
Resp.content(Object content)
Sets the content to be serialized into a body when the HTTP response is rendered.
|
Resp |
Resp.contentType(MediaType contentType)
Sets the
Content-Type header to be rendered in the HTTP response. |
Resp |
Resp.file(File file)
Sets the file to be served when the HTTP response is rendered.
|
Resp |
Resp.filename(String filename)
Sets the filename when serving a file in the HTTP response.
|
Resp |
Resp.html(Object content)
Sets the
Content-Type: text/html; charset=utf-8 header and the content of the HTTP response. |
Resp |
Resp.json(Object content)
Sets the
Content-Type: application/json; charset=utf-8 header and the content of the HTTP
response. |
Resp |
Resp.plain(Object content)
Sets the
Content-Type: text/plain; charset=utf-8 header and the content of the HTTP response. |
Resp |
Resp.redirect(String redirectURI)
Sets the redirect URI of the HTTP response.
|
Resp |
Req.response()
Gets the reference to the response object.
|
Resp |
Resp.view(String viewName)
Sets a custom view name of the HTTP response.
|
Copyright © 2014–2015 Nikolche Mihajlovski and contributors. All rights reserved.