public interface BodyHandler extends Handler<RoutingContext>
RoutingContext
.
It also handles HTTP file uploads and can be used to limit body sizes.
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
|
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
|
static final long DEFAULT_BODY_LIMIT
static final String DEFAULT_UPLOADS_DIRECTORY
static final boolean DEFAULT_MERGE_FORM_ATTRIBUTES
static BodyHandler create()
BodyHandler setBodyLimit(long bodyLimit)
bodyLimit
- the max sizeBodyHandler setUploadsDirectory(String uploadsDirectory)
uploadsDirectory
- the uploads directoryBodyHandler setMergeFormAttributes(boolean mergeFormAttributes)
mergeFormAttributes
- true if they should be mergedCopyright © 2015. All Rights Reserved.