play.api

mvc

package mvc

Contains the Controller/Action/Result API to handle HTTP requests.

For example, a typical controller:

object Application extends Controller {

def index = Action {
  Ok("It works!")
}

}
Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. mvc
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait AcceptExtractors extends AnyRef

    Define a set of extractors allowing to pattern match on the Accept HTTP header of a request

  2. case class Accepting(mimeType: String) extends Product with Serializable

    Convenient class to generate extractors checking if a given mime type matches the Accept header of a request.

  3. trait Action[A] extends EssentialAction

    An action is essentially a (Request[A] => Result) function that handles a request and generates a result to be sent to the client.

  4. trait ActionBuilder[R[_]] extends AnyRef

    Provides helpers for creating Action values.

  5. sealed trait AnyContent extends AnyRef

    A request body that adapts automatically according the request Content-Type.

  6. case class AnyContentAsFormUrlEncoded(data: Map[String, Seq[String]]) extends AnyContent with Product with Serializable

    AnyContent - Form url encoded body

  7. case class AnyContentAsJson(json: JsValue) extends AnyContent with Product with Serializable

    AnyContent - Json body

  8. case class AnyContentAsMultipartFormData(mdf: MultipartFormData[TemporaryFile]) extends AnyContent with Product with Serializable

    AnyContent - Multipart form data body

  9. case class AnyContentAsRaw(raw: RawBuffer) extends AnyContent with Product with Serializable

    AnyContent - Raw body (give access to the raw data as bytes).

  10. case class AnyContentAsText(txt: String) extends AnyContent with Product with Serializable

    AnyContent - Text body

  11. case class AnyContentAsXml(xml: NodeSeq) extends AnyContent with Product with Serializable

    AnyContent - XML body

  12. trait BodyParser[+A] extends (RequestHeader) ⇒ Iteratee[Array[Byte], Either[SimpleResult, A]]

    A body parser parses the HTTP request body content.

  13. trait BodyParsers extends AnyRef

    Default body parsers.

  14. case class Call(method: String, url: String) extends mvc.Call with Product with Serializable

    Defines a Call, which describes an HTTP request and can be used to create links or fill redirect data.

  15. case class Codec(charset: String)(encode: (String) ⇒ Array[Byte], decode: (Array[Byte]) ⇒ String) extends Product with Serializable

    A Codec handle the conversion of String to Byte arrays.

  16. trait Content extends AnyRef

    Generic type representing content to be sent over an HTTP response.

  17. trait Controller extends Results with BodyParsers with HttpProtocol with Status with HeaderNames with ContentTypes with RequestExtractors with Rendering

    Defines utility methods to generate Action and Results types.

  18. case class Cookie(name: String, value: String, maxAge: Option[Int] = scala.None, path: String = "/", domain: Option[String] = scala.None, secure: Boolean = false, httpOnly: Boolean = true) extends Product with Serializable

    An HTTP cookie.

  19. trait CookieBaker[T <: AnyRef] extends AnyRef

    Trait that should be extended by the Cookie helpers.

  20. trait Cookies extends Traversable[Cookie]

    The HTTP cookies set.

  21. case class DiscardingCookie(name: String, path: String = "/", domain: Option[String] = scala.None, secure: Boolean = false) extends Product with Serializable

    A cookie to be discarded.

  22. trait EssentialAction extends (RequestHeader) ⇒ Iteratee[Array[Byte], SimpleResult] with Handler

  23. trait EssentialFilter extends AnyRef

    Implement this interface if you want to add a Filter to your application

  24. trait Filter extends EssentialFilter

  25. case class Flash(data: Map[String, String] = ...) extends Product with Serializable

    HTTP Flash scope.

  26. trait Handler extends AnyRef

    An Handler handles a request.

  27. class HandlerRef[T] extends mvc.HandlerRef

    Reference to an Handler.

  28. trait Headers extends AnyRef

    The HTTP headers set.

  29. trait JavascriptLitteral[A] extends AnyRef

    Transform a value to a Javascript literal.

  30. case class MaxSizeExceeded(length: Int) extends Product with Serializable

    Signal a max content size exceeded

  31. case class MultipartFormData[A](dataParts: Map[String, Seq[String]], files: Seq[FilePart[A]], badParts: Seq[BadPart], missingFileParts: Seq[MissingFilePart]) extends Product with Serializable

    Multipart form data body.

  32. trait PathBindable[A] extends AnyRef

    Binder for URL path parameters.

  33. trait QueryStringBindable[A] extends AnyRef

    Binder for query string parameters.

  34. case class RawBuffer(memoryThreshold: Int, initialData: Array[Byte] = ...) extends Product with Serializable

    Handle the request body a raw bytes data.

  35. trait Rendering extends AnyRef

  36. trait Request[+A] extends RequestHeader

    The complete HTTP request.

  37. trait RequestExtractors extends AcceptExtractors

  38. trait RequestHeader extends AnyRef

    The HTTP request header.

  39. trait RequestTaggingHandler extends Handler

    A handler that is able to tag requests

  40. case class ResponseHeader(status: Int, headers: Map[String, String] = ...) extends Product with Serializable

    A simple HTTP response header, used for standard responses.

  41. sealed trait Result extends NotNull with WithHeaders[Result]

    Any Action result.

  42. trait Results extends AnyRef

    Helper utilities to generate results.

  43. case class Session(data: Map[String, String] = ...) extends Product with Serializable

    HTTP Session.

  44. case class SimpleResult(header: ResponseHeader, body: Enumerator[Array[Byte]], connection: Connection = HttpConnection.KeepAlive) extends PlainResult with WithHeaders[SimpleResult] with Product with Serializable

    A simple result, which defines the response header and a body ready to send to the client.

  45. case class WebSocket[A](f: (RequestHeader) ⇒ (Enumerator[A], Iteratee[A, Unit]) ⇒ Unit)(implicit frameFormatter: FrameFormatter[A]) extends Handler with Product with Serializable

    A WebSocket handler.

  46. class WithFilters extends GlobalSettings

  47. sealed trait WithHeaders[+A <: Result] extends AnyRef

  48. class WrappedRequest[A] extends Request[A]

    Wrap an existing request.

  49. case class AsyncResult(result: Future[Result]) extends Result with WithHeaders[AsyncResult] with Product with Serializable

    An AsyncResult handles a Promise of result for cases where the result is not ready yet.

  50. class ChunkedResult[A] extends SimpleResult

    A chunked result, which defines the response header and a chunks enumerator to send asynchronously to the client.

  51. sealed trait PlainResult extends Result with WithHeaders[PlainResult]

    A plain HTTP result.

Value Members

  1. object Action extends ActionBuilder[Request]

    Helper object to create Action values.

  2. object AnyContentAsEmpty extends AnyContent with Product with Serializable

    AnyContent - Empty request body

  3. object BodyParser

    Helper object to construct BodyParser values.

  4. object BodyParsers extends BodyParsers

    Defaults BodyParsers.

  5. object Codec extends Serializable

    Default Codec support.

  6. object Cookies

    Helper utilities to encode Cookies.

  7. object EssentialAction

  8. object Filter

  9. object FilterChain

    Compose the action and the Filters to create a new Action

  10. object Filters

    Compose the action and the Filters to create a new Action

  11. object Flash extends CookieBaker[Flash] with Serializable

    Helper utilities to manage the Flash cookie.

  12. object HttpConnection extends Enumeration

    The connection semantics for the result.

  13. object JavascriptLitteral

    Default JavaScript literals converters.

  14. object MultipartFormData extends Serializable

    Defines parts handled by Multipart form data.

  15. object PathBindable

    Default binders for URL path part.

  16. object QueryStringBindable

    Default binders for Query String

  17. object Request

  18. object RequestHeader

  19. object Results extends Results

    Helper utilities to generate results.

  20. object Security

    Helpers to create secure actions.

  21. object Session extends CookieBaker[Session] with Serializable

    Helper utilities to manage the Session cookie.

  22. object Socket

    Alias types for Sockets

  23. object WebSocket extends Serializable

    Helper utilities to generate WebSocket results.

Deprecated Value Members

  1. object ChunkedResult extends Serializable

    Annotations
    @deprecated
    Deprecated

    (Since version 2.2.0) Use SimpleResult with Results.chunk enumeratee instead. Will be removed in Play 2.3.

  2. object PlainResult

    Helper utilities for Result values.

Inherited from AnyRef

Inherited from Any

Ungrouped