public static interface MultipartBodyBuilder.PartBuilder
Modifier and Type | Method and Description |
---|---|
MultipartBodyBuilder.PartBuilder |
contentType(MediaType contentType)
Set the media type of the part.
|
MultipartBodyBuilder.PartBuilder |
filename(String filename)
Set the filename parameter for a file part.
|
MultipartBodyBuilder.PartBuilder |
header(String headerName,
String... headerValues)
Add part header values.
|
MultipartBodyBuilder.PartBuilder |
headers(Consumer<HttpHeaders> headersConsumer)
Manipulate the part headers through the given consumer.
|
MultipartBodyBuilder.PartBuilder contentType(MediaType contentType)
contentType
- the content typeHttpHeaders.setContentType(MediaType)
MultipartBodyBuilder.PartBuilder filename(String filename)
Resource
based parts that expose a filename but may be useful for
Publisher
parts.filename
- the filename to set on the Content-DispositionMultipartBodyBuilder.PartBuilder header(String headerName, String... headerValues)
headerName
- the part header nameheaderValues
- the part header value(s)HttpHeaders.addAll(String, List)
MultipartBodyBuilder.PartBuilder headers(Consumer<HttpHeaders> headersConsumer)
headersConsumer
- consumer to manipulate the part headers with