- java.lang.Object
-
- net.dongliu.cute.http.body.Parts
-
-
构造器概要
构造器 构造器 说明 Parts()
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static Part<InputSupplier>file(String name, String filename, byte[] bytes, MimeType mimeType)Create a file multi-part form field.static Part<InputSupplier>file(String name, String filename, InputSupplier supplier, MimeType mimeType)Create a file multi-part form field.static Part<InputSupplier>file(String name, Path path)Create a file multi-part form field.static Part<InputSupplier>file(String name, Path path, MimeType mimeType)Create a file multi-part form field.static Part<String>text(String name, String value)Create a text multi-part form field.
-
-
-
方法详细资料
-
file
public static Part<InputSupplier> file(String name, Path path, MimeType mimeType)
Create a file multi-part form field. The Text Part just as html input field:<input type="file" name="the_name">
- 参数:
name- the part namepath- the file pathmimeType- the mimeType
-
file
public static Part<InputSupplier> file(String name, Path path)
Create a file multi-part form field. The Text Part just as html input field:<input type="file" name="the_name">
The mime-type will be detected from file name extension. If detect failed, useMimeType.OCTET_STREAM- 参数:
name- the part namepath- the file path
-
file
public static Part<InputSupplier> file(String name, String filename, InputSupplier supplier, MimeType mimeType)
Create a file multi-part form field. The Text Part just as html<input type="file" name="the_name">
do.- 参数:
name- the part namefilename- the filename, can be emptysupplier- the file content providermimeType- the mimeType
-
file
public static Part<InputSupplier> file(String name, String filename, byte[] bytes, MimeType mimeType)
Create a file multi-part form field. The Text Part just as html<input type="file" name="the_name">
do.- 参数:
name- the part namefilename- the filename, can be emptybytes- the file contentmimeType- the mimeType
-
-