public class Redirect extends Result
Constructor and Description |
---|
Redirect(String url) |
Redirect(String url,
boolean permanent) |
Redirect(String url,
int code) |
Redirect(String url,
Map<String,String> parameters)
Redirects to a given URL with the parameters specified in a
Map |
Modifier and Type | Method and Description |
---|---|
void |
apply(Http.Request request,
Http.Response response) |
int |
getCode() |
String |
getUrl() |
getEncoding, setContentTypeIfNotSet
fillInStackTrace
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public String url
public int code
public Redirect(String url)
public Redirect(String url, Map<String,String> parameters)
Map
url
- The URL to redirect to as a String
parameters
- Parameters to be included at the end of the URL as a HTTP GET. This is a map whose entries are written out as key1=value1&key2=value2 etc..public Redirect(String url, boolean permanent)
public Redirect(String url, int code)
public void apply(Http.Request request, Http.Response response)
public String getUrl()
public int getCode()
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly