Package: io.vertx.groovy.ext.web.handler

## [Groovy] Class BodyHandler

- io.vertx.groovy.ext.web.handler.BodyHandler

- All Implemented Interfaces and Traits:
    io.vertx.core.Handler

      @groovy.transform.CompileStatic
      class BodyHandler
      extends java.lang.Object

  A handler which gathers the entire request body and sets it on the .

  It also handles HTTP file uploads and can be used to limit body sizes.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `BodyHandler (java.lang.Object delegate)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `static BodyHandler` | `create()` Create a body handler with defaults
    `static BodyHandler` | `create(java.lang.String uploadDirectory)` Create a body handler and use the given upload directory.
    `java.lang.Object` | `getDelegate()`
    `void` | `handle(RoutingContext arg0)`
    `BodyHandler` | `setBodyLimit(long bodyLimit)` Set the maximum body size -1 means unlimited
    `BodyHandler` | `setDeleteUploadedFilesOnEnd(boolean deleteUploadedFilesOnEnd)` Set whether uploaded files should be removed after handling the request
    `BodyHandler` | `setMergeFormAttributes(boolean mergeFormAttributes)` Set whether form attributes will be added to the request parameters
    `BodyHandler` | `setUploadsDirectory(java.lang.String uploadsDirectory)` Set the uploads directory to use

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class java.lang.Object` | `java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()`

- - ### Constructor Detail

    - #### BodyHandler(java.lang.Object delegate)

  - ### Method Detail

    - #### static BodyHandler create()

      Create a body handler with defaults

      Returns:
        the body handler

    - #### static BodyHandler create(java.lang.String uploadDirectory)

      Create a body handler and use the given upload directory.

      Returns:
        the body handler
      Parameters:
        `uploadDirectory` - the uploads directory

    - #### java.lang.Object getDelegate()

    - #### void handle(RoutingContext arg0)

    - #### BodyHandler setBodyLimit(long bodyLimit)

      Set the maximum body size -1 means unlimited

      Returns:
        reference to this for fluency
      Parameters:
        `bodyLimit` - the max size

    - #### BodyHandler setDeleteUploadedFilesOnEnd(boolean deleteUploadedFilesOnEnd)

      Set whether uploaded files should be removed after handling the request

      Returns:
        reference to this for fluency
      Parameters:
        `deleteUploadedFilesOnEnd` - true if uploaded files should be removed after handling the request

    - #### BodyHandler setMergeFormAttributes(boolean mergeFormAttributes)

      Set whether form attributes will be added to the request parameters

      Returns:
        reference to this for fluency
      Parameters:
        `mergeFormAttributes` - true if they should be merged

    - #### BodyHandler setUploadsDirectory(java.lang.String uploadsDirectory)

      Set the uploads directory to use

      Returns:
        reference to this for fluency
      Parameters:
        `uploadsDirectory` - the uploads directory