class Default extends BodyParser[AnyContent]
- Alphabetic
- By Inheritance
- Default
- BodyParser
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Default(tfc: TemporaryFileCreator = SingletonTemporaryFileCreator, eh: HttpErrorHandler = new DefaultHttpErrorHandler(), config: ParserConfiguration = ParserConfiguration())(implicit mat: Materializer)
An alternate constructor primarily designed for unit testing.
An alternate constructor primarily designed for unit testing. Default values are set to empty or singleton implementations where appropriate.
- new Default(parse: PlayBodyParsers)
- Annotations
- @Inject()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def andThen[A](g: (Accumulator[ByteString, Either[Result, AnyContent]]) => A): (RequestHeader) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def apply(rh: RequestHeader): Accumulator[ByteString, Either[Result, AnyContent]]
- Definition Classes
- Default → Function1
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def compose[A](g: (A) => RequestHeader): (A) => Accumulator[ByteString, Either[Result, AnyContent]]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def map[B](f: (AnyContent) => 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
- Definition Classes
- BodyParser
- See also
play.api.libs.streams.Accumulator.map
- def mapM[B](f: (AnyContent) => 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
- Definition Classes
- BodyParser
- See also
play.api.libs.streams.Accumulator.mapFuture[B]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Function1 → AnyRef → Any
- def validate[B](f: (AnyContent) => 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.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
- Definition Classes
- BodyParser
- def validateM[B](f: (AnyContent) => 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
- Definition Classes
- BodyParser
- See also
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()