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 Classes Modifier and Type Interface Description static class
BodyParser.AnyContent
Guess the body content by checking the Content-Type header.static class
BodyParser.BufferingBodyParser<A>
A body parser that first buffersstatic class
BodyParser.Bytes
Parse the body as a byte string.static class
BodyParser.CompletableBodyParser<A>
A body parser that completes the underlying one.static class
BodyParser.Default
If the request has a body, guess the body content by checking the Content-Type header.static class
BodyParser.DelegatingBodyParser<A,B>
A body parser that delegates to a Scala body parser, and uses the supplied function to transform its result to a Java body.static class
BodyParser.DelegatingMultipartFormDataBodyParser<A>
A body parser that exposes a file part handler as an abstract method and delegates the implementation to the underlying Scala multipartParser.static class
BodyParser.Empty
Don't parse the body.static class
BodyParser.FormUrlEncoded
Parse the body as form url encoded if the Content-Type is application/x-www-form-urlencoded.static class
BodyParser.Json
Parse the body as Json if the Content-Type is text/json or application/json.static class
BodyParser.MaxLengthBodyParser<A>
Abstract body parser that enforces a maximum length.static class
BodyParser.MultipartFormData
Parse the body as multipart form-data without checking the Content-Type.static interface
BodyParser.Of
Specify the body parser to use for an Action method.static class
BodyParser.Raw
Store the body content in a RawBuffer.static class
BodyParser.TemporaryFile
static class
BodyParser.Text
Parse the body as text if the Content-Type is text/plain.static class
BodyParser.ToFile
static class
BodyParser.TolerantJson
Parse the body as Json without checking the Content-Type.static class
BodyParser.TolerantText
Parse the body as text without checking the Content-Type.static class
BodyParser.TolerantXml
Parse the body as Xml without checking the Content-Type.static class
BodyParser.Xml
Parse the body as Xml if the Content-Type is application/xml.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Accumulator<ByteString,F.Either<Result,A>>
apply(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 Detail
-
apply
Accumulator<ByteString,F.Either<Result,A>> apply(Http.RequestHeader request)
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
static <A extends B,B> BodyParser<B> widen(BodyParser<A> parser)
-
-