public static class BodyParser.FormUrlEncoded extends BodyParser.BufferingBodyParser<java.util.Map<java.lang.String,java.lang.String[]>>
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 and Description |
---|
FormUrlEncoded(play.api.http.HttpConfiguration httpConfiguration,
HttpErrorHandler errorHandler) |
FormUrlEncoded(long maxLength,
HttpErrorHandler errorHandler) |
Modifier and Type | Method and Description |
---|---|
Accumulator<akka.util.ByteString,F.Either<Result,java.util.Map<java.lang.String,java.lang.String[]>>> |
apply(Http.RequestHeader request)
Return an accumulator to parse the body of the given HTTP request.
|
protected java.util.Map<java.lang.String,java.lang.String[]> |
parse(Http.RequestHeader request,
akka.util.ByteString bytes)
Parse the body.
|
apply1
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
widen
public FormUrlEncoded(long maxLength, HttpErrorHandler errorHandler)
@Inject public FormUrlEncoded(play.api.http.HttpConfiguration httpConfiguration, HttpErrorHandler errorHandler)
public Accumulator<akka.util.ByteString,F.Either<Result,java.util.Map<java.lang.String,java.lang.String[]>>> apply(Http.RequestHeader request)
BodyParser
The accumulator should either produce a result if an error was encountered, or the parsed body.
apply
in interface BodyParser<java.util.Map<java.lang.String,java.lang.String[]>>
apply
in class BodyParser.MaxLengthBodyParser<java.util.Map<java.lang.String,java.lang.String[]>>
request
- The request to create the body parser for.protected java.util.Map<java.lang.String,java.lang.String[]> parse(Http.RequestHeader request, akka.util.ByteString bytes) throws java.lang.Exception
BodyParser.BufferingBodyParser
parse
in class BodyParser.BufferingBodyParser<java.util.Map<java.lang.String,java.lang.String[]>>
request
- The request associated with the body.bytes
- The bytes of the body.java.lang.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.