Trait/Object

play.api.mvc

BodyParser

Related Docs: object BodyParser | package mvc

Permalink

trait BodyParser[+A] extends (RequestHeader) ⇒ Accumulator[ByteString, 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) ⇒ Accumulator[ByteString, Either[Result, A]], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BodyParser
  2. Function1
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(v1: RequestHeader): Accumulator[ByteString, Either[Result, A]]

    Permalink
    Definition Classes
    Function1

Concrete Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def andThen[A](g: (Accumulator[ByteString, Either[Result, A]]) ⇒ A): (RequestHeader) ⇒ A

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

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

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

    Permalink
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  8. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

    Permalink

    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.streams.Accumulator.map

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

    Permalink

    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.streams.Accumulator.mapFuture[B]

    map

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

    Permalink
    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

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

    Permalink

    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.toJson(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

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

    Permalink

    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

  23. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from (RequestHeader) ⇒ Accumulator[ByteString, Either[Result, A]]

Inherited from AnyRef

Inherited from Any

Ungrouped