play.api.mvc

Result

sealed trait Result extends NotNull with WithHeaders[Result]

Any Action result.

Source
Results.scala
Linear Supertypes
WithHeaders[Result], NotNull, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Result
  2. WithHeaders
  3. NotNull
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def as(contentType: String): Result

    Changes the result content type.

    Changes the result content type.

    For example:

    Ok("Hello world").as("text/xml")
    contentType

    the new content type.

    returns

    the new result

    Definition Classes
    WithHeaders
  2. abstract def discardingCookies(cookies: DiscardingCookie*): Result

    Discards cookies along this result.

    Discards cookies along this result.

    For example:

    Ok("Hello world").discardingCookies(DiscardingCookie("theme"))
    cookies

    the cookies to discard along to this result

    returns

    the new result

    Definition Classes
    WithHeaders
  3. abstract def flashing(values: (String, String)*): Result

    Adds values to the flash scope for this result.

    Adds values to the flash scope for this result.

    For example:

    Ok("Hello world").flashing("success" -> "Done!")
    returns

    the new result

    Definition Classes
    WithHeaders
  4. abstract def flashing(flash: Flash): Result

    Adds values to the flash scope for this result.

    Adds values to the flash scope for this result.

    For example:

    Ok("Hello world").flashing(flash + ("success" -> "Done!"))
    flash

    the flash scope to set with this result

    returns

    the new result

    Definition Classes
    WithHeaders
  5. abstract def withCookies(cookies: Cookie*): Result

    Adds cookies to this result.

    Adds cookies to this result.

    For example:

    Ok("Hello world").withCookies(Cookie("theme", "blue"))
    cookies

    the cookies to add to this result

    returns

    the new result

    Definition Classes
    WithHeaders
  6. abstract def withHeaders(headers: (String, String)*): Result

    Adds HTTP headers to this result.

    Adds HTTP headers to this result.

    For example:

    Ok("Hello world").withHeaders(ETAG -> "0")
    headers

    the headers to add to this result.

    returns

    the new result

    Definition Classes
    WithHeaders
  7. abstract def withNewSession: Result

    Discards the existing session for this result.

    Discards the existing session for this result.

    For example:

    Ok("Hello world").withNewSession
    returns

    the new result

    Definition Classes
    WithHeaders
  8. abstract def withSession(session: (String, String)*): Result

    Sets a new session for this result, discarding the existing session.

    Sets a new session for this result, discarding the existing session.

    For example:

    Ok("Hello world").withSession("saidHello" -> "yes")
    session

    the session to set with this result

    returns

    the new result

    Definition Classes
    WithHeaders
  9. abstract def withSession(session: Session): Result

    Sets a new session for this result.

    Sets a new session for this result.

    For example:

    Ok("Hello world").withSession(session + ("saidHello" -> "true"))
    session

    the session to set with this result

    returns

    the new result

    Definition Classes
    WithHeaders

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  20. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  21. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  22. def withLang(lang: Lang)(implicit app: Application): Result

    Sets the users language permanently for future requests by storing it in a cookie.

    Sets the users language permanently for future requests by storing it in a cookie.

    For example:

    implicit val lang = Lang("fr-FR")
    Ok(Messages("hello.world")).withLang(lang)
    lang

    the language to store for the user

    returns

    the new result

    Definition Classes
    WithHeaders

Deprecated Value Members

  1. def discardingCookies(name: String, names: String*): Result

    Discards cookies along this result.

    Discards cookies along this result.

    For example:

    Ok("Hello world").discardingCookies("theme")
    names

    the names of the cookies to discard along to this result

    returns

    the new result

    Definition Classes
    WithHeaders
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1) This method can only discard cookies on the / path with no domain and without secure set. Use discardingCookies(DiscardingCookie*) instead.

Inherited from WithHeaders[Result]

Inherited from NotNull

Inherited from AnyRef

Inherited from Any

Ungrouped