io.undertow.util

## Class RedirectBuilder

- java.lang.Object
- - io.undertow.util.RedirectBuilder

    public class RedirectBuilder
    extends Object

Utility class for building redirects.

Author:
  Stuart Douglas

### Field Summary

Fields
`static String` `UTF_8`

### Method Summary

All Methods Static Methods Concrete Methods
`static 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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### UTF_8

    public static final String UTF_8

### Method Detail

#### redirect

    public static String redirect(HttpServerExchange exchange,
                                  String newRelativePath)

Redirects to a new relative path. All other data from the exchange is preserved.

Parameters:
  `exchange` - The HTTP server exchange
  `newRelativePath` - 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 exchange
  `newRelativePath` - The new relative path
  `includeParameters` - If query and path parameters from the exchange should be included
Returns: