utils
play.api.mvc.BodyParsers.utils
object utils extends BodyParserUtils
Attributes
- Graph
-
- Supertypes
- Self type
-
utils.type
Members list
Value members
Inherited methods
Don't parse the body content.
A body parser that always returns an error.
def flatten[A](underlying: Future[BodyParser[A]])(implicit ec: ExecutionContext, mat: Materializer): BodyParser[A]
A body parser that flattens a future BodyParser.
Attributes
- Inherited from:
- BodyParserUtils
def maxLength[A](maxLength: Long, parser: BodyParser[A])(implicit mat: Materializer): BodyParser[Either[MaxSizeExceeded, A]]
Wrap an existing BodyParser with a maxLength constraints.
Wrap an existing BodyParser with a maxLength constraints.
Value parameters
- maxLength
-
The max length allowed
- parser
-
The BodyParser to wrap
Attributes
- Inherited from:
- BodyParserUtils
Allows to choose the right BodyParser parser to use by examining the request headers.
Allows to choose the right BodyParser parser to use by examining the request headers.
Attributes
- Inherited from:
- BodyParserUtils
def when[A](predicate: RequestHeader => Boolean, parser: BodyParser[A], badResult: RequestHeader => Future[Result]): BodyParser[A]
Creates a conditional BodyParser.
In this article