public class Results extends Object
Constructor and Description |
---|
Results() |
Modifier and Type | Method and Description |
---|---|
static AsyncResult |
async() |
static Result |
badRequest() |
static Result |
contentType(String contentType) |
static Result |
created(Optional<String> url) |
static Result |
forbidden() |
static Result |
html() |
static Result |
internalServerError() |
static Result |
json() |
static Result |
jsonp() |
static Result |
noContent() |
static Result |
notFound() |
static Result |
ok() |
static Result |
redirect(String url)
A redirect that uses 303 see other.
|
static Result |
redirectTemporary(String url)
A redirect that uses 307 see other.
|
static Result |
status(int statusCode) |
static Result |
text() |
static Result |
TODO() |
static Result |
unauthorized() |
static Result |
webSocketContinue()
Instructs ninja (and the http container) that it is okay to continue with
the websocket handshake.
|
static Result |
xml() |
public static Result status(int statusCode)
public static Result ok()
public static Result notFound()
public static Result forbidden()
public static Result unauthorized()
public static Result badRequest()
public static Result noContent()
public static Result internalServerError()
public static Result redirect(String url)
NoHttpBody
that is set as renderable of
the Result.url
- The url used as redirect target.public static Result redirectTemporary(String url)
NoHttpBody
that is set as renderable of
the Result.url
- The url used as redirect target.public static Result html()
public static Result text()
public static Result json()
public static Result jsonp()
public static Result xml()
public static Result TODO()
public static Result webSocketContinue()
101 Switching Protocols
. Do not include any result via
a render() as writing it out will not be possible if you intend on
switching protocols (e.g. upgrade to a websocket).public static AsyncResult async()
Copyright © 2019 ninjaframework. All rights reserved.