Implemented FieldParams to parse and access parameter values in header fields
Made upload a Route variant instead of attribute
Added utility method to set response body from a string
Added example page for file uploading
Implemented UploadResponseTask to handle uploading a file
Added utility methods into Request to access a header by name
Added utility methods to Reader for pattern searching
Upload semantics
A route of type upload can now be set in the config. Routes with this type will forward POST requests to the upload handler if the target uri is a directory. Files are uploaded to the target directory and can be accessed via GET. A basic example can be found by navigating to http://localhost:8080/uploads with the default config.
Main changes
WriteTask
for async file writes201 Created
FieldParams
to parse and access parameter values in header fieldsRoute
variant instead of attributeUploadResponseTask
to handle uploading a fileRequest
to access a header by nameReader
for pattern searchingUpload semantics
A route of type
upload
can now be set in the config. Routes with this type will forwardPOST
requests to the upload handler if the target uri is a directory. Files are uploaded to the target directory and can be accessed viaGET
. A basic example can be found by navigating to http://localhost:8080/uploads with the default config.Not in this PR
67