Default max length allowed for disk based body.
Default max length allowed for disk based body.
You can configure it in application.conf:
play.http.parser.maxDiskBuffer = 512k
Default max length allowed for text based body.
Default max length allowed for text based body.
You can configure it in application.conf:
play.http.parser.maxMemoryBuffer = 512k
Unlimited size.
Guess the body content by checking the Content-Type header.
Guess the body content by checking the Content-Type header.
If the request has a body, parse the body content by checking the Content-Type header.
If the request has a body, parse the body content by checking the Content-Type header.
Don't parse the body content.
Don't parse the body content.
A body parser that always returns an error.
A body parser that always returns an error.
Store the body content into a file.
Store the body content into a file.
The file used to store the content.
A body parser that flattens a future BodyParser.
A body parser that flattens a future BodyParser.
Parse the body and binds it to a given form model.
Parse the body and binds it to a given form model.
case class User(name: String) val userForm: Form[User] = Form(mapping("name" -> nonEmptyText)(User.apply)(User.unapply)) Action(parse.form(userForm)) { request => Ok(s"Hello, ${request.body.name}!") }
Form model
Max length allowed or returns EntityTooLarge HTTP response. If None
, the default play.http.parser.maxMemoryBuffer
configuration value is used.
The result to reply in case of errors during the form binding process
Parse the body as form url encoded if the Content-Type is application/x-www-form-urlencoded.
Parse the body as form url encoded if the Content-Type is application/x-www-form-urlencoded.
Parse the body as form url encoded if the Content-Type is application/x-www-form-urlencoded.
Max length allowed or returns EntityTooLarge HTTP response.
Parse the body as Json if the Content-Type is text/json or application/json, validating the result with the Json reader.
Parse the body as Json if the Content-Type is text/json or application/json, validating the result with the Json reader.
the type to read and validate from the body.
a Json reader for type A.
Parse the body as Json if the Content-Type is text/json or application/json.
Parse the body as Json if the Content-Type is text/json or application/json.
Parse the body as Json if the Content-Type is text/json or application/json.
Max length allowed or returns EntityTooLarge HTTP response.
Wrap an existing BodyParser with a maxLength constraints.
Wrap an existing BodyParser with a maxLength constraints.
The max length allowed
The BodyParser to wrap
Parse the content as multipart/form-data
Parse the content as multipart/form-data
Handles file parts.
Parse the content as multipart/form-data
Store the body content in a RawBuffer.
Store the body content in a RawBuffer.
Store the body content in a RawBuffer.
If the content size is bigger than this limit, the content is stored as file.
Store the body content into a temporary file.
Parse the body as text if the Content-Type is text/plain.
Parse the body as text if the Content-Type is text/plain.
Parse the body as text if the Content-Type is text/plain.
Max length allowed or returns EntityTooLarge HTTP response.
Create a body parser that uses the given parser and enforces the given max length.
Create a body parser that uses the given parser and enforces the given max length.
The name of the body parser.
The maximum length of the body to buffer.
The error message to prepend to the exception message if an error was encountered.
The parser.
Parse the body as form url encoded without checking the Content-Type.
Parse the body as Form url encoded without checking the Content-Type.
Parse the body as Form url encoded without checking the Content-Type.
Max length allowed or returns EntityTooLarge HTTP response.
Parse the body as Json without checking the Content-Type.
Parse the body as Json without checking the Content-Type.
Parse the body as Json without checking the Content-Type.
Max length allowed or returns EntityTooLarge HTTP response.
Parse the body as text without checking the Content-Type.
Parse the body as text without checking the Content-Type.
Parse the body as text without checking the Content-Type.
Max length allowed or returns EntityTooLarge HTTP response.
Parse the body as Xml without checking the Content-Type.
Parse the body as Xml without checking the Content-Type.
Parse the body as Xml without checking the Content-Type.
Max length allowed or returns EntityTooLarge HTTP response.
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.
Creates a conditional BodyParser.
Creates a conditional BodyParser.
Parse the body as Xml if the Content-Type is application/xml, text/xml or application/XXX+xml.
Parse the body as Xml if the Content-Type is application/xml, text/xml or application/XXX+xml.
Parse the body as Xml if the Content-Type is application/xml, text/xml or application/XXX+xml.
Max length allowed or returns EntityTooLarge HTTP response.
(Since version 2.6.0) Use formUrlEncoded
(Since version 2.6.0) Use formUrlEncoded
Body parsers officially supported by Play (i.e. built-in to Play)