Response |
Response.andBinaryContent(byte[] content) |
Sends binary content to the client skipping rendering
|
Response |
Response.andBinaryFile(Path file) |
Sends a binary file to the client skipping rendering
|
Response |
Response.andBody(String body) |
Sets the body of the response.
|
Response |
Response.andCharset(String charset) |
Sets a specific charset to the response
|
Response |
Response.andContent(String name,
Object object) |
Adds a value to the template that can be accessed using ${name} in the template
|
Response |
Response.andContent(Map<String,Object> content) |
Adds an additional content map to the content rendered in the template.
|
Response |
Response.andContentType(String contentType) |
Sets a specific content type to use for the response.
|
Response |
Response.andCookie(io.undertow.server.handlers.Cookie cookie) |
Adds an additional Cookie to the response which is passed to the client
|
Response |
Response.andEmptyBody() |
Disables template rendering, sending an empty body in the response
|
Response |
Response.andEndResponse() |
Tells a filter that the response ends and that the request handler
should not execute further filters by sending the current response
to the client.
|
Response |
Response.andHeader(io.undertow.util.HttpString key,
String value) |
Adds an additional header to the request response.
|
Response |
Response.andHeaders(Map<io.undertow.util.HttpString,String> headers) |
Adds an additional header map to the response.
|
Response |
Response.andJsonBody(Object jsonObject) |
Converts a given Object to JSON and passing it to the response.
|
Response |
Response.andTemplate(String template) |
Sets a specific template to use for the response
|
Response |
Response.andTextBody(String body) |
Sets the body of the response.
|
Response |
Response.andUnrenderedBody() |
Sets the content of a given file placed in the templates folder
in /templates/CONTROLLER_NAME/METHOD_NAME.body as body without rendering the
file in the template engine
|
Response |
Attachment.getResponse() |
|
static Response |
Response.withBadRequest() |
Creates a response object with HTTP status code 400
|
static Response |
Response.withCreated() |
Creates a response object with HTTP status code 201
|
static Response |
Response.withForbidden() |
Creates a response object with HTTP status code 401
|
static Response |
Response.withInternalServerError() |
Creates a response object with HTTP status code 500
|
static Response |
Response.withNotFound() |
Creates a response object with HTTP status code 404
|
static Response |
Response.withOk() |
Creates a response object with HTTP status code 200
|
static Response |
Response.withRedirect(String redirectTo) |
Creates a response object with a given url to redirect to
|
static Response |
Response.withStatusCode(int statusCode) |
Creates a response object with a given HTTP status code
|
static Response |
Response.withUnauthorized() |
Creates a response object with HTTP status code 403
|