play.api.mvc.Results

Status

class Status extends SimpleResult[EmptyContent]

Generates default SimpleResult from a content type, headers and content.

Linear Supertypes
SimpleResult[EmptyContent], Serializable, Serializable, Product, Equals, PlainResult, Result, NotNull, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Status
  2. SimpleResult
  3. Serializable
  4. Serializable
  5. Product
  6. Equals
  7. PlainResult
  8. Result
  9. NotNull
  10. AnyRef
  11. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Status (status: Int)

    status

    the HTTP response status, e.g ‘200 OK’

Type Members

  1. type BODY_CONTENT = EmptyContent

    The body content type.

    The body content type.

    Definition Classes
    SimpleResult

Value Members

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  6. def apply [C] (content: C)(implicit writeable: Writeable[C], contentTypeOf: ContentTypeOf[C]): SimpleResult[C]

    Set the result's content.

    Set the result's content.

    C

    the content type

    content

    content to send

  7. def as (contentType: String): PlainResult

    Changes the result content type.

    Changes the result content type.

    For example:

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

    the new content type.

    returns

    the new result

    Definition Classes
    PlainResult
  8. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  9. val body : Enumerator[EmptyContent]

    Definition Classes
    SimpleResult
  10. def canEqual (arg0: Any): Boolean

    Definition Classes
    SimpleResult → Equals
  11. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def discardingCookies (names: String*): PlainResult

    Discards cookies along this result.

    Discards cookies along this result.

    For example:

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

    the new result

    Definition Classes
    PlainResult
  13. def eq (arg0: AnyRef): Boolean

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

    Definition Classes
    SimpleResult → Equals → AnyRef → Any
  15. def feed [C] (content: Enumerator[C])(implicit writeable: Writeable[C]): SimpleResult[C]

  16. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  17. def flashing (values: (String, String)*): PlainResult

    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
    PlainResult
  18. def flashing (flash: Flash): PlainResult

    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
    PlainResult
  19. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  20. def hashCode (): Int

    Definition Classes
    SimpleResult → AnyRef → Any
  21. val header : ResponseHeader

    The response header

    The response header

    Definition Classes
    SimpleResultPlainResult
  22. def isInstanceOf [T0] : Boolean

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

    Attributes
    final
    Definition Classes
    AnyRef
  24. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  25. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  26. def productArity : Int

    Definition Classes
    SimpleResult → Product
  27. def productElement (arg0: Int): Any

    Definition Classes
    SimpleResult → Product
  28. def productIterator : Iterator[Any]

    Definition Classes
    Product
  29. def productPrefix : String

    Definition Classes
    SimpleResult → Product
  30. def sendFile (content: File, inline: Boolean = false, fileName: (File) ⇒ String = _.getName): SimpleResult[Array[Byte]]

    Send a file.

    Send a file.

    content

    The file to send

    inline

    Use Content-Disposition inline or attachment.

    fileName

    function to retrieve the file name (only used for Content-Disposition attachment)

  31. def stream [C] (content: (Iteratee[C, Unit]) ⇒ Unit)(implicit writeable: Writeable[C], contentTypeOf: ContentTypeOf[C]): ChunkedResult[C]

    Set the result's content as chunked.

    Set the result's content as chunked.

    C

    the chunk type

    content

    A function that will give you the Iteratee to write in once ready.

  32. def stream [C] (content: Enumerator[C])(implicit writeable: Writeable[C], contentTypeOf: ContentTypeOf[C]): ChunkedResult[C]

    Set the result's content as chunked.

    Set the result's content as chunked.

    C

    the chunk type

    content

    Enumerator providing the chunked content.

  33. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  34. def toString (): String

    Definition Classes
    SimpleResult → AnyRef → Any
  35. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  38. def withCookies (cookies: Cookie*): PlainResult

    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
    PlainResult
  39. def withHeaders (headers: (String, String)*): SimpleResult[EmptyContent]

    Adds headers to this result.

    Adds 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
    SimpleResultPlainResult
  40. def withNewSession : PlainResult

    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
    PlainResult
  41. def withSession (session: (String, String)*): PlainResult

    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
    PlainResult
  42. def withSession (session: Session): PlainResult

    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
    PlainResult
  43. implicit val writeable : Writeable[EmptyContent]

    Attributes
    implicit
    Definition Classes
    SimpleResult

Deprecated Value Members

  1. def productElements : Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    use productIterator instead

Inherited from SimpleResult[EmptyContent]

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from PlainResult

Inherited from Result

Inherited from NotNull

Inherited from AnyRef

Inherited from Any