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 Type
Method
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.

## Method Details

### contentType

MultipartBodyBuilder.PartBuilder contentType(MediaType contentType)
Set the media type of the part.

Parameters:
  `contentType` - the content type
Since:
  5.2
See Also:
  - `HttpHeaders.setContentType(MediaType)`

### filename

MultipartBodyBuilder.PartBuilder filename(String filename)
Set the filename parameter for a file part. This should not be necessary with `Resource` based parts that expose a filename but may be useful for `Publisher` parts.

Parameters:
  `filename` - the filename to set on the Content-Disposition
Since:
  5.2

### header

MultipartBodyBuilder.PartBuilder header(String headerName, String... headerValues)
Add part header values.

Parameters:
  `headerName` - the part header name
  `headerValues` - the part header value(s)
Returns:
  this builder
See Also:
  - `HttpHeaders.addAll(String, List)`

### headers

MultipartBodyBuilder.PartBuilder headers(Consumer<HttpHeaders> headersConsumer)
Manipulate the part headers through the given consumer.

Parameters:
  `headersConsumer` - consumer to manipulate the part headers with
Returns:
  this builder