Form class for direct MVC parameter provisioning.
HTTP request must be encoded as MediaType.FORM_URLENCODED
or MediaType.MULTIPART_FORMDATA
.
- Since:
- 2.0.0
- Author:
- edgar
-
Method Summary
Modifier and TypeMethodDescriptionstatic Formdata
Creates a new multipart object.A file upload that matches the given field name.files()
All file uploads.All file uploads that matches the given field name.void
put
(String name, FileUpload file) Put/Add a file into this multipart request.void
Add a form field.void
Add a form field.void
put
(String path, Collection<String> values) Add a form field.Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.jooby.Value
booleanValue, booleanValue, byteValue, byteValue, doubleValue, doubleValue, floatValue, floatValue, intValue, intValue, isArray, isMissing, isObject, isPresent, isSingle, longValue, longValue, name, to, toEnum, toEnum, toList, toList, toMap, toMultimap, toNullable, toOptional, toOptional, toSet, toSet, value, value, value, valueOrNull
-
Method Details
-
put
Add a form field.- Parameters:
path
- Form name/path.value
- Form value.
-
put
Add a form field.- Parameters:
path
- Form name/path.value
- Form value.
-
put
Add a form field.- Parameters:
path
- Form name/path.values
- Form values.
-
put
Put/Add a file into this multipart request.- Parameters:
name
- HTTP name.file
- File upload.
-
files
All file uploads. Only formultipart/form-data
request.- Returns:
- All file uploads.
-
files
All file uploads that matches the given field name.Only for
multipart/form-data
request.- Parameters:
name
- Field name. Please note this is the form field name, not the actual file name.- Returns:
- All file uploads.
-
file
A file upload that matches the given field name.Only for
multipart/form-data
request.- Parameters:
name
- Field name. Please note this is the form field name, not the actual file name.- Returns:
- A file upload.
-
create
Creates a new multipart object.- Parameters:
ctx
- Current context.- Returns:
- Multipart instance.
-