utils

play.api.mvc.BodyParsers.utils
object utils extends BodyParserUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
utils.type

Members list

Value members

Inherited methods

Don't parse the body content.

Don't parse the body content.

Attributes

Inherited from:
BodyParserUtils
def error[A](result: Future[Result]): BodyParser[A]

A body parser that always returns an error.

A body parser that always returns an error.

Attributes

Inherited from:
BodyParserUtils
def flatten[A](underlying: Future[BodyParser[A]])(implicit ec: ExecutionContext, mat: Materializer): BodyParser[A]

A body parser that flattens a future BodyParser.

A body parser that flattens a future BodyParser.

Attributes

Inherited from:
BodyParserUtils
def ignore[A](body: A): BodyParser[A]

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
def using[A](f: RequestHeader => BodyParser[A]): BodyParser[A]

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.

Creates a conditional BodyParser.

Attributes

Inherited from:
BodyParserUtils