@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 and description |
|---|
BodyHandler
(java.lang.Object delegate) |
| 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 |
| 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() |
Create a body handler with defaults
Create a body handler and use the given upload directory.
uploadDirectory - the uploads directorySet the maximum body size -1 means unlimited
bodyLimit - the max sizeSet whether uploaded files should be removed after handling the request
deleteUploadedFilesOnEnd - true if uploaded files should be removed after handling the requestSet whether form attributes will be added to the request parameters
mergeFormAttributes - true if they should be mergedSet the uploads directory to use
uploadsDirectory - the uploads directory