Interface ClientMultipartForm
- All Superinterfaces:
ClientForm
A multipart form, providing file upload capabilities.
- Author:
- Julien Viet
-
Method Summary
Modifier and TypeMethodDescriptionbinaryFileUpload(String name, String filename, String mediaType, Buffer content) Add a binary file upload form data part.binaryFileUpload(String name, String filename, String mediaType, String pathname) Add a binary file upload form data part.Set thecharsetto use when encoding the form.Set thecharsetto use when encoding the form.booleanmixed()mixed(boolean allow) Allow or disallow multipart mixed encoding when files are sharing the same file name.static ClientMultipartFormtextFileUpload(String name, String filename, String mediaType, Buffer content) Add a text file upload form data part.textFileUpload(String name, String filename, String mediaType, String pathname) Add a text file upload form data part.Methods inherited from interface ClientForm
charset
-
Method Details
-
multipartForm
- Returns:
- a blank multipart form
-
attribute
- Specified by:
attributein interfaceClientForm
-
charset
Set thecharsetto use when encoding the form. The default charset isStandardCharsets.UTF_8.- Specified by:
charsetin interfaceClientForm- Parameters:
charset- the charset to use- Returns:
- a reference to this, so the API can be used fluently
-
charset
Set thecharsetto use when encoding the form. The default charset isStandardCharsets.UTF_8.- Specified by:
charsetin interfaceClientForm- Parameters:
charset- the charset to use- Returns:
- a reference to this, so the API can be used fluently
-
mixed
Allow or disallow multipart mixed encoding when files are sharing the same file name.
The default value istrue.
Set tofalseif you want to achieve the behavior for HTML5.- Parameters:
allow-trueallows use of multipart mixed encoding- Returns:
- a reference to this, so the API can be used fluently
-
mixed
boolean mixed()- Returns:
- whether multipart mixed encoding is allowed
-
textFileUpload
Add a text file upload form data part.- Parameters:
name- name of the parameterfilename- filename of the filemediaType- the MIME type of the filecontent- the content of the file- Returns:
- a reference to this, so the API can be used fluently
-
binaryFileUpload
ClientMultipartForm binaryFileUpload(String name, String filename, String mediaType, Buffer content) Add a binary file upload form data part.- Parameters:
name- name of the parameterfilename- filename of the filemediaType- the MIME type of the filecontent- the content of the file- Returns:
- a reference to this, so the API can be used fluently
-
textFileUpload
Add a text file upload form data part.- Parameters:
name- name of the parameterfilename- filename of the filemediaType- the MIME type of the filepathname- the pathname of the file- Returns:
- a reference to this, so the API can be used fluently
-
binaryFileUpload
ClientMultipartForm binaryFileUpload(String name, String filename, String mediaType, String pathname) Add a binary file upload form data part.- Parameters:
name- name of the parameterfilename- filename of the filemediaType- the MIME type of the filepathname- the pathname of the file- Returns:
- a reference to this, so the API can be used fluently
-