接口 MultipartBodyBuilder.PartBuilder
- 封闭类:
- MultipartBodyBuilder
public static interface MultipartBodyBuilder.PartBuilder
Builder that allows for further customization of part headers.
-
方法概要
修饰符和类型方法说明contentType(MediaType contentType) Set the media type of the part.Set the filename parameter for a file part.Add part header values.headers(Consumer<HttpHeaders> headersConsumer) Manipulate the part headers through the given consumer.
-
方法详细资料
-
contentType
Set the media type of the part.- 参数:
contentType- the content type- 另请参阅:
-
filename
Set the filename parameter for a file part. This should not be necessary withResourcebased parts that expose a filename but may be useful forPublisherparts.- 参数:
filename- the filename to set on the Content-Disposition
-
header
Add part header values.- 参数:
headerName- the part header nameheaderValues- the part header value(s)- 返回:
- this builder
- 另请参阅:
-
MultiValueMap.addAll(Object, Collection)
-
headers
Manipulate the part headers through the given consumer.- 参数:
headersConsumer- consumer to manipulate the part headers with- 返回:
- this builder
-