public class HttpAction extends TechnicalException
| Modifier and Type | Field and Description |
|---|---|
protected int |
code |
| Modifier | Constructor and Description |
|---|---|
protected |
HttpAction(int code) |
| Modifier and Type | Method and Description |
|---|---|
static HttpAction |
forbidden(WebContext context)
Build a forbidden response.
|
int |
getCode()
Return the HTTP code.
|
static HttpAction |
noContent(WebContext context)
Build an HTTP No content.
|
static HttpAction |
ok(WebContext context,
java.lang.String content)
Build an HTTP Ok.
|
static HttpAction |
redirect(WebContext context,
java.lang.String url)
Build a redirection.
|
static HttpAction |
status(int status,
WebContext context)
Build a response with status.
|
java.lang.String |
toString() |
static HttpAction |
unauthorized(WebContext context)
Build a basic auth popup credentials.
|
public static HttpAction status(int status, WebContext context)
status - the HTTP statuscontext - contextpublic static HttpAction redirect(WebContext context, java.lang.String url)
context - contexturl - urlpublic static HttpAction ok(WebContext context, java.lang.String content)
context - contextcontent - contentpublic static HttpAction noContent(WebContext context)
context - contextpublic static HttpAction unauthorized(WebContext context)
context - contextpublic static HttpAction forbidden(WebContext context)
context - contextpublic int getCode()
public java.lang.String toString()
toString in class java.lang.ThrowableCopyright © 2019. All Rights Reserved.