new BodyHandler()
- Source:
Methods
handle(event)
Something has happened, so handle it.
Parameters:
| Name | Type | Description |
|---|---|---|
event |
RoutingContext | the event to handle |
- Source:
setBodyLimit(bodyLimit) → {BodyHandler}
Set the maximum body size -1 means unlimited
Parameters:
| Name | Type | Description |
|---|---|---|
bodyLimit |
number | the max size |
- Source:
Returns:
reference to this for fluency
- Type
- BodyHandler
setDeleteUploadedFilesOnEnd(deleteUploadedFilesOnEnd) → {BodyHandler}
Set whether uploaded files should be removed after handling the request
Parameters:
| Name | Type | Description |
|---|---|---|
deleteUploadedFilesOnEnd |
boolean | true if uploaded files should be removed after handling the request |
- Source:
Returns:
reference to this for fluency
- Type
- BodyHandler
setHandleFileUploads(handleFileUploads) → {BodyHandler}
Set whether file uploads will be handled
Parameters:
| Name | Type | Description |
|---|---|---|
handleFileUploads |
boolean | true if they should be handled |
- Source:
Returns:
reference to this for fluency
- Type
- BodyHandler
setMergeFormAttributes(mergeFormAttributes) → {BodyHandler}
Set whether form attributes will be added to the request parameters
Parameters:
| Name | Type | Description |
|---|---|---|
mergeFormAttributes |
boolean | true if they should be merged |
- Source:
Returns:
reference to this for fluency
- Type
- BodyHandler
setPreallocateBodyBuffer(isPreallocateBodyBuffer) → {BodyHandler}
Pre-allocate the body buffer according to the value parsed from content-length header.
The buffer is capped at 64KB
Parameters:
| Name | Type | Description |
|---|---|---|
isPreallocateBodyBuffer |
boolean | true if body buffer is pre-allocated according to the size read from content-length Header. {code false} if body buffer is pre-allocated to 1KB, and is resized dynamically |
- Source:
Returns:
reference to this for fluency
- Type
- BodyHandler
setUploadsDirectory(uploadsDirectory) → {BodyHandler}
Set the uploads directory to use
Parameters:
| Name | Type | Description |
|---|---|---|
uploadsDirectory |
string | the uploads directory |
- Source:
Returns:
reference to this for fluency
- Type
- BodyHandler