Package io.undertow.util
Class RedirectBuilder
- java.lang.Object
-
- io.undertow.util.RedirectBuilder
-
public class RedirectBuilder extends java.lang.Object
Utility class for building redirects.- Author:
- Stuart Douglas
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
UTF_8
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
redirect(HttpServerExchange exchange, java.lang.String newRelativePath)
Redirects to a new relative path.static java.lang.String
redirect(HttpServerExchange exchange, java.lang.String newRelativePath, boolean includeParameters)
Redirects to a new relative path.
-
-
-
Method Detail
-
redirect
public static java.lang.String redirect(HttpServerExchange exchange, java.lang.String newRelativePath)
Redirects to a new relative path. All other data from the exchange is preserved.- Parameters:
exchange
- The HTTP server exchangenewRelativePath
- The new relative path- Returns:
-
redirect
public static java.lang.String redirect(HttpServerExchange exchange, java.lang.String newRelativePath, boolean includeParameters)
Redirects to a new relative path. All other data from the exchange is preserved.- Parameters:
exchange
- The HTTP server exchangenewRelativePath
- The new relative pathincludeParameters
- If query and path parameters from the exchange should be included- Returns:
-
-