Package play.mvc
Class BodyParser.TolerantText
- Object
-
- play.mvc.BodyParser.MaxLengthBodyParser<A>
-
- play.mvc.BodyParser.BufferingBodyParser<String>
-
- play.mvc.BodyParser.TolerantText
-
- All Implemented Interfaces:
BodyParser<String>
- Enclosing interface:
- BodyParser<A>
public static class BodyParser.TolerantText extends BodyParser.BufferingBodyParser<String>
Parse the body as text 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
Constructors Constructor Description TolerantText(long maxLength, HttpErrorHandler errorHandler)
TolerantText(play.api.http.HttpConfiguration httpConfiguration, HttpErrorHandler errorHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
parse(Http.RequestHeader request, ByteString bytes)
Parse the body.-
Methods inherited from class play.mvc.BodyParser.BufferingBodyParser
apply1
-
Methods inherited from class play.mvc.BodyParser.MaxLengthBodyParser
apply
-
-
-
-
Constructor Detail
-
TolerantText
public TolerantText(long maxLength, HttpErrorHandler errorHandler)
-
TolerantText
@Inject public TolerantText(play.api.http.HttpConfiguration httpConfiguration, HttpErrorHandler errorHandler)
-
-
Method Detail
-
parse
protected String parse(Http.RequestHeader request, ByteString bytes) throws Exception
Description copied from class:BodyParser.BufferingBodyParser
Parse the body.- Specified by:
parse
in classBodyParser.BufferingBodyParser<String>
- 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.
-
-