interface BodyHandler : 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
static val DEFAULT_BODY_LIMIT: Long
Default max size for a request body. -1 means unlimited |
|
static val DEFAULT_DELETE_UPLOADED_FILES_ON_END: Boolean
Default value of whether uploaded files should be removed after handling the request |
|
static val DEFAULT_MERGE_FORM_ATTRIBUTES: Boolean
Default value of whether form attributes should be merged into request params |
|
static val DEFAULT_UPLOADS_DIRECTORY: String
Default uploads directory on server for file uploads |
open static fun create(): BodyHandler
Create a body handler with defaults open static fun create(uploadDirectory: String): BodyHandler
Create a body handler and use the given upload directory. |
|
abstract fun setBodyLimit(bodyLimit: Long): BodyHandler
Set the maximum body size -1 means unlimited |
|
abstract fun setDeleteUploadedFilesOnEnd(deleteUploadedFilesOnEnd: Boolean): BodyHandler
Set whether uploaded files should be removed after handling the request |
|
abstract fun setMergeFormAttributes(mergeFormAttributes: Boolean): BodyHandler
Set whether form attributes will be added to the request parameters |
|
abstract fun setUploadsDirectory(uploadsDirectory: String): BodyHandler
Set the uploads directory to use |