Showing content from https://www.playframework.com/documentation/2.5.x/api/scala/play/api/mvc/BodyParser.html below:
BodyParser - play.api.mvc.BodyParser
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, A]]) â A): (RequestHeader) â A
-
Definition Classes
-
Function1
-
Annotations
-
@unspecialized()
final def asInstanceOf[T0]: T0
def clone(): AnyRef
-
Attributes
-
protected[java.lang]
-
Definition Classes
-
AnyRef
-
Annotations
-
@throws( ... )
def compose[A](g: (A) â RequestHeader): (A) â Accumulator[ByteString, Either[Result, A]]
-
Definition Classes
-
Function1
-
Annotations
-
@unspecialized()
final def eq(arg0: AnyRef): Boolean
-
Definition Classes
-
AnyRef
def equals(arg0: Any): Boolean
-
Definition Classes
-
AnyRef â Any
def finalize(): Unit
-
Attributes
-
protected[java.lang]
-
Definition Classes
-
AnyRef
-
Annotations
-
@throws( classOf[java.lang.Throwable] )
final def getClass(): Class[_]
-
Definition Classes
-
AnyRef â Any
def hashCode(): Int
-
Definition Classes
-
AnyRef â Any
final def isInstanceOf[T0]: Boolean
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.streams.Accumulator.map
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.streams.Accumulator.mapFuture
map
final def ne(arg0: AnyRef): Boolean
-
Definition Classes
-
AnyRef
final def notify(): Unit
-
Definition Classes
-
AnyRef
final def notifyAll(): Unit
-
Definition Classes
-
AnyRef
final def synchronized[T0](arg0: â T0): T0
-
Definition Classes
-
AnyRef
def toString(): String
-
Definition Classes
-
Function1 â AnyRef â Any
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
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
final def wait(): Unit
-
Definition Classes
-
AnyRef
-
Annotations
-
@throws( ... )
final def wait(arg0: Long, arg1: Int): Unit
-
Definition Classes
-
AnyRef
-
Annotations
-
@throws( ... )
final def wait(arg0: Long): Unit
-
Definition Classes
-
AnyRef
-
Annotations
-
@throws( ... )
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4