Package play.mvc

Class BodyParser.BufferingBodyParser<A>

    • Constructor Detail

      • BufferingBodyParser

        protected BufferingBodyParser​(long maxLength,
                                      HttpErrorHandler errorHandler,
                                      String errorMessage)
      • BufferingBodyParser

        protected BufferingBodyParser​(play.api.http.HttpConfiguration httpConfiguration,
                                      HttpErrorHandler errorHandler,
                                      String errorMessage)
    • Method Detail

      • parse

        protected abstract A parse​(Http.RequestHeader request,
                                   ByteString bytes)
                            throws Exception
        Parse the body.
        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.