Package play.mvc
Interface BodyParser<A>
- All Known Implementing Classes:
BodyParser.AnyContent,BodyParser.BufferingBodyParser,BodyParser.Bytes,BodyParser.CompletableBodyParser,BodyParser.Default,BodyParser.DelegatingBodyParser,BodyParser.DelegatingMultipartFormDataBodyParser,BodyParser.Empty,BodyParser.FormUrlEncoded,BodyParser.Json,BodyParser.MaxLengthBodyParser,BodyParser.MultipartFormData,BodyParser.Raw,BodyParser.TemporaryFile,BodyParser.Text,BodyParser.ToFile,BodyParser.TolerantJson,BodyParser.TolerantText,BodyParser.TolerantXml,BodyParser.Xml
public interface BodyParser<A>
A body parser parses the HTTP request body content.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classGuess the body content by checking the Content-Type header.static classA body parser that first buffersstatic classParse the body as a byte string.static classA body parser that completes the underlying one.static classIf the request has a body, guess the body content by checking the Content-Type header.static classA body parser that delegates to a Scala body parser, and uses the supplied function to transform its result to a Java body.static classA body parser that exposes a file part handler as an abstract method and delegates the implementation to the underlying Scala multipartParser.static classDon't parse the body.static classParse the body as form url encoded if the Content-Type is application/x-www-form-urlencoded.static classParse the body as Json if the Content-Type is text/json or application/json.static classAbstract body parser that enforces a maximum length.static classParse the body as multipart form-data without checking the Content-Type.static @interfaceSpecify the body parser to use for an Action method.static classStore the body content in a RawBuffer.static classstatic classParse the body as text if the Content-Type is text/plain.static classstatic classParse the body as Json without checking the Content-Type.static classParse the body as text without checking the Content-Type.static classParse the body as Xml without checking the Content-Type.static classParse the body as Xml if the Content-Type is application/xml. -
Method Summary
Modifier and TypeMethodDescriptionapply(Http.RequestHeader request) Return an accumulator to parse the body of the given HTTP request.static <A extends B,B>
BodyParser<B>widen(BodyParser<A> parser)
-
Method Details
-
apply
Return an accumulator to parse the body of the given HTTP request.The accumulator should either produce a result if an error was encountered, or the parsed body.
- Parameters:
request- The request to create the body parser for.- Returns:
- The accumulator to parse the body.
-
widen
-