Package play.mvc
Class BodyParser.TolerantXml
- All Implemented Interfaces:
BodyParser<Document>
- Direct Known Subclasses:
BodyParser.Xml
- Enclosing interface:
- BodyParser<A>
Parse the body as Xml without checking the Content-Type.
-
Nested Class Summary
Nested classes/interfaces inherited from interface play.mvc.BodyParser
BodyParser.AnyContent, BodyParser.BufferingBodyParser<A>, BodyParser.Bytes, BodyParser.CompletableBodyParser<A>, BodyParser.Default, BodyParser.DelegatingBodyParser<A,B>, BodyParser.DelegatingMultipartFormDataBodyParser<A>, BodyParser.Empty, BodyParser.FormUrlEncoded, BodyParser.Json, BodyParser.MaxLengthBodyParser<A>, BodyParser.MultipartFormData, BodyParser.Of, BodyParser.Raw, BodyParser.TemporaryFile, BodyParser.Text, BodyParser.ToFile, BodyParser.TolerantJson, BodyParser.TolerantText, BodyParser.TolerantXml, BodyParser.Xml -
Constructor Summary
ConstructorsConstructorDescriptionTolerantXml(long maxLength, HttpErrorHandler errorHandler) TolerantXml(play.api.http.HttpConfiguration httpConfiguration, HttpErrorHandler errorHandler) -
Method Summary
Modifier and TypeMethodDescriptionprotected Documentparse(Http.RequestHeader request, ByteString bytes) Parse the body.Methods inherited from class play.mvc.BodyParser.BufferingBodyParser
apply1Methods inherited from class play.mvc.BodyParser.MaxLengthBodyParser
apply
-
Constructor Details
-
TolerantXml
-
TolerantXml
@Inject public TolerantXml(play.api.http.HttpConfiguration httpConfiguration, HttpErrorHandler errorHandler)
-
-
Method Details
-
parse
Description copied from class:BodyParser.BufferingBodyParserParse the body.- Specified by:
parsein classBodyParser.BufferingBodyParser<Document>- Parameters:
request- The request associated with the body.bytes- The bytes of the body.- Returns:
- The body.
- Throws:
Exception- If the body failed to parse. It is assumed that any exceptions thrown by this method are the fault of the client, so a 400 bad request error will be returned if this method throws an exception.
-