Package io.undertow.util
Class RedirectBuilder
java.lang.Object
io.undertow.util.RedirectBuilder
Utility class for building redirects.
- Author:
- Stuart Douglas
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
redirect
(HttpServerExchange exchange, String newRelativePath) Redirects to a new relative path.static String
redirect
(HttpServerExchange exchange, String newRelativePath, boolean includeParameters) Redirects to a new relative path.
-
Field Details
-
UTF_8
-
-
Method Details
-
redirect
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 String redirect(HttpServerExchange exchange, 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:
-