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 classBodyParser.AnyContentGuess the body content by checking the Content-Type header.static classBodyParser.BufferingBodyParser<A>A body parser that first buffersstatic classBodyParser.BytesParse the body as a byte string.static classBodyParser.CompletableBodyParser<A>A body parser that completes the underlying one.static classBodyParser.DefaultIf the request has a body, guess the body content by checking the Content-Type header.static classBodyParser.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 classBodyParser.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 classBodyParser.EmptyDon't parse the body.static classBodyParser.FormUrlEncodedParse the body as form url encoded if the Content-Type is application/x-www-form-urlencoded.static classBodyParser.JsonParse the body as Json if the Content-Type is text/json or application/json.static classBodyParser.MaxLengthBodyParser<A>Abstract body parser that enforces a maximum length.static classBodyParser.MultipartFormDataParse the body as multipart form-data without checking the Content-Type.static interfaceBodyParser.OfSpecify the body parser to use for an Action method.static classBodyParser.RawStore the body content in a RawBuffer.static classBodyParser.TemporaryFilestatic classBodyParser.TextParse the body as text if the Content-Type is text/plain.static classBodyParser.ToFilestatic classBodyParser.TolerantJsonParse the body as Json without checking the Content-Type.static classBodyParser.TolerantTextParse the body as text without checking the Content-Type.static classBodyParser.TolerantXmlParse the body as Xml without checking the Content-Type.static classBodyParser.XmlParse 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)
-
-