play.api.mvc

BodyParser

Related Docs: object BodyParser | package mvc

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

A body parser parses the HTTP request body content.

A

the body content type

Self Type
BodyParser[A]
Source
Action.scala
Linear Supertypes
(RequestHeader) ⇒ Iteratee[Array[Byte], Either[Result, A]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BodyParser
  2. Function1
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(v1: RequestHeader): Iteratee[Array[Byte], Either[Result, A]]

    Definition Classes
    Function1

Concrete Value Members

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

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Definition Classes
    AnyRef → Any
  4. def andThen[A](g: (Iteratee[Array[Byte], Either[Result, A]]) ⇒ A): (RequestHeader) ⇒ A

    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def compose[A](g: (A) ⇒ RequestHeader): (A) ⇒ Iteratee[Array[Byte], Either[Result, A]]

    Definition Classes
    Function1
    Annotations
    @unspecialized()
  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( classOf[java.lang.Throwable] )
  11. def flatMap[B](f: (A) ⇒ BodyParser[B])(implicit ec: ExecutionContext): BodyParser[B]

    Uses the provided function to transform the BodyParser’s computed result into another BodyParser to continue with.

    Uses the provided function to transform the BodyParser’s computed result into another BodyParser to continue with.

    On Done of the Iteratee produced by this BodyParser, the result is passed to the provided function, and the resulting BodyParser is given the same RequestHeader and the Iteratee produced is used to continue consuming input.

    f

    the function to produce a new body parser from the result of this body parser

    ec

    The context to execute the supplied function with. The context is prepared on the calling thread.

    returns

    the transformed body parser

    See also

    play.api.libs.iteratee.Iteratee#flatMap

  12. def flatMapM[B](f: (A) ⇒ Future[BodyParser[B]])(implicit ec: ExecutionContext): BodyParser[B]

    Like flatMap but allows the flatMap function to execute asynchronously.

    Like flatMap but allows the flatMap function to execute asynchronously.

    f

    the async function to produce a new body parser from the result of this body parser

    ec

    The context to execute the supplied function with. The context is prepared on the calling thread.

    returns

    the transformed body parser

    See also

    play.api.libs.iteratee.Iteratee#flatMapM

    flatMap

  13. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  16. def map[B](f: (A) ⇒ B)(implicit ec: ExecutionContext): BodyParser[B]

    Uses the provided function to transform the BodyParser's computed result when the request body has been parsed.

    Uses the provided function to transform the BodyParser's computed result when the request body has been parsed.

    f

    a function for transforming the computed result

    ec

    The context to execute the supplied function with. The context is prepared on the calling thread.

    returns

    the transformed body parser

    See also

    play.api.libs.iteratee.Iteratee#map

  17. def mapM[B](f: (A) ⇒ Future[B])(implicit ec: ExecutionContext): BodyParser[B]

    Like map but allows the map function to execute asynchronously.

    Like map but allows the map function to execute asynchronously.

    f

    the async function to map the result of the body parser

    ec

    The context to execute the supplied function with. The context prepared on the calling thread.

    returns

    the transformed body parser

    See also

    play.api.libs.iteratee.Iteratee#mapM

    map

  18. final def ne(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AnyRef
  22. def toString(): String

    Definition Classes
    Function1 → AnyRef → Any
  23. def validate[B](f: (A) ⇒ Either[Result, B])(implicit ec: ExecutionContext): BodyParser[B]

    Uses the provided function to validate the BodyParser's computed result when the request body has been parsed.

    Uses the provided function to validate the BodyParser's computed result when the request body has been parsed.

    The provided function can produce either a direct result, which will short circuit any further Action, or a value of type B.

    Example:

    def validateJson[A : Reads] = parse.json.validate(
      _.validate[A].asEither.left.map(e => BadRequest(JsError.toFlatJson(e)))
    )
    f

    the function to validate the computed result of this body parser

    ec

    The context to execute the supplied function with. The context is prepared on the calling thread.

    returns

    the transformed body parser

  24. def validateM[B](f: (A) ⇒ Future[Either[Result, B]])(implicit ec: ExecutionContext): BodyParser[B]

    Like validate but allows the validate function to execute asynchronously.

    Like validate but allows the validate function to execute asynchronously.

    f

    the async function to validate the computed result of this body parser

    ec

    The context to execute the supplied function with. The context is prepared on the calling thread.

    returns

    the transformed body parser

    See also

    validate

  25. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from (RequestHeader) ⇒ Iteratee[Array[Byte], Either[Result, A]]

Inherited from AnyRef

Inherited from Any

Ungrouped