spring-framework / org.springframework.http.client / MultipartBodyBuilder / part

part

fun part(name: String, part: Any): PartBuilder

Adds a part to this builder, allowing for further header customization with the returned PartBuilder.

Parameters

name - the name of the part to add (may not be empty)

part - the part to add

Return
a builder that allows for further header customization

fun part(name: String, part: Any, @Nullable contentType: MediaType): PartBuilder

Adds a part to this builder, allowing for further header customization with the returned PartBuilder.

Parameters

name - the name of the part to add (may not be empty)

part - the part to add

contentType - the Content-Type header for the part (may be null)

Return
a builder that allows for further header customization