io.vertx.ext.web.handler

## Interface BodyHandler

- All Superinterfaces:
    Handler<RoutingContext>

      public interface BodyHandler
      extends Handler<RoutingContext>

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

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

  Author:
    Tim Fox

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static long` | `DEFAULT_BODY_LIMIT` Default max size for a request body.
    `static boolean` | `DEFAULT_MERGE_FORM_ATTRIBUTES` Default value of whether form attributes should be merged into request params
    `static String` | `DEFAULT_UPLOADS_DIRECTORY` Default uploads directory on server for file uploads

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static BodyHandler` | `create()` Create a body handler with defaults
    `BodyHandler` | `setBodyLimit(long bodyLimit)` Set the maximum body size -1 means unlimited
    `BodyHandler` | `setMergeFormAttributes(boolean mergeFormAttributes)` Set whether form attributes will be added to the request parameters
    `BodyHandler` | `setUploadsDirectory(String uploadsDirectory)` Set the uploads directory to use

    - ### Methods inherited from interface io.vertx.core.Handler

      `handle`

- - ### Field Detail

    - #### DEFAULT_BODY_LIMIT

          static final long DEFAULT_BODY_LIMIT

      Default max size for a request body. -1 means unlimited
      See Also:
        Constant Field Values

    - #### DEFAULT_UPLOADS_DIRECTORY

          static final String DEFAULT_UPLOADS_DIRECTORY

      Default uploads directory on server for file uploads
      See Also:
        Constant Field Values

    - #### DEFAULT_MERGE_FORM_ATTRIBUTES

          static final boolean DEFAULT_MERGE_FORM_ATTRIBUTES

      Default value of whether form attributes should be merged into request params
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### create

          static BodyHandler create()

      Create a body handler with defaults
      Returns:
        the body handler

    - #### setBodyLimit

          BodyHandler setBodyLimit(long bodyLimit)

      Set the maximum body size -1 means unlimited
      Parameters:
        `bodyLimit` - the max size
      Returns:
        reference to this for fluency

    - #### setUploadsDirectory

          BodyHandler setUploadsDirectory(String uploadsDirectory)

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

    - #### setMergeFormAttributes

          BodyHandler setMergeFormAttributes(boolean mergeFormAttributes)

      Set whether form attributes will be added to the request parameters
      Parameters:
        `mergeFormAttributes` - true if they should be merged
      Returns:
        reference to this for fluency

Copyright © 2015. All Rights Reserved.