Package org.springframework.http.client
Interface MultipartBodyBuilder.PartBuilder
- Enclosing class:
- MultipartBodyBuilder
public static interface MultipartBodyBuilder.PartBuilder
Builder that allows for further customization of part headers.
-
Method Summary
Modifier and TypeMethodDescriptioncontentType(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.
-
Method Details
-
contentType
Set the media type of the part.- Parameters:
contentType- the content type- Since:
- 5.2
- See Also:
-
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.- Parameters:
filename- the filename to set on the Content-Disposition- Since:
- 5.2
-
header
Add part header values.- Parameters:
headerName- the part header nameheaderValues- the part header value(s)- Returns:
- this builder
- See Also:
-
headers
Manipulate the part headers through the given consumer.- Parameters:
headersConsumer- consumer to manipulate the part headers with- Returns:
- this builder
-