play.mvc.results

## Class Redirect

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.lang.RuntimeException
      - - play.utils.FastRuntimeException
        - - play.mvc.results.Result
          - - play.mvc.results.Redirect

- All Implemented Interfaces:
    java.io.Serializable

      public class Redirect
      extends Result

  302 Redirect
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `code`
    `java.lang.String` | `url`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Redirect(java.lang.String url)`
    `Redirect(java.lang.String url, boolean permanent)`
    `Redirect(java.lang.String url, int code)`
    `Redirect(java.lang.String url, java.util.Map<java.lang.String,java.lang.String> parameters)` Redirects to a given URL with the parameters specified in a `Map`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `apply(Http.Request request, Http.Response response)`
    `int` | `getCode()`
    `java.lang.String` | `getUrl()`

    - ### Methods inherited from class play.mvc.results.Result

      `getEncoding, setContentTypeIfNotSet`

    - ### Methods inherited from class play.utils.FastRuntimeException

      `fillInStackTrace`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- - ### Field Detail

    - #### url

          public java.lang.String url

    - #### code

          public int code

  - ### Constructor Detail

    - #### Redirect

          public Redirect(java.lang.String url)

    - #### Redirect

          public Redirect(java.lang.String url,
                          java.util.Map<java.lang.String,java.lang.String> parameters)

      Redirects to a given URL with the parameters specified in a `Map`
      Parameters:
        `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..

    - #### Redirect

          public Redirect(java.lang.String url,
                          boolean permanent)

    - #### Redirect

          public Redirect(java.lang.String url,
                          int code)

  - ### Method Detail

    - #### apply

          public void apply(Http.Request request,
                            Http.Response response)

      Specified by:
        `apply` in class `Result`

    - #### getUrl

          public java.lang.String getUrl()

    - #### getCode

          public int getCode()

Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly