Top Description Methods
org.springframework.http.codec.multipart

public Interface Part

Known Direct Subinterfaces
org.springframework.http.codec.multipart.FilePart, org.springframework.http.codec.multipart.FormFieldPart
Known Direct Implementers
org.springframework.http.codec.multipart.DefaultParts.AbstractPart
Imports
reactor.core.publisher.Flux, .Mono, org.springframework.core.io.buffer.DataBuffer, org.springframework.http.HttpHeaders

Representation for a part in a "multipart/form-data" request.

The origin of a multipart request may be a browser form in which case each part is either a FormFieldPart or a FilePart.

Multipart requests may also be used outside a browser for data of any content type (e.g. JSON, PDF, etc).

Authors
Sebastien Deleuze, Rossen Stoyanchev
Since
5.0
See Also
RFC 7578 (multipart/form-data), RFC 2183 (Content-Disposition), HTML5 (multipart forms)

Method Summary

Modifier and TypeMethod and Description
public Flux<DataBuffer>
content()

Return the content for this part.

public default Mono<Void>
delete()

Return a mono that, when subscribed to, deletes the underlying storage for this part.

public HttpHeaders
headers()

Return the headers associated with the part.

public String

Returns:

the name of the part, never null or empty
name
()

Return the name of the part in the multipart form.

Method Detail

contentback to summary
public Flux<DataBuffer> content()

Return the content for this part.

Note that for a FormFieldPart the content may be accessed more easily via FormFieldPart#value().

deleteback to summary
public default Mono<Void> delete()

Return a mono that, when subscribed to, deletes the underlying storage for this part.

Since
5.3.13
headersback to summary
public HttpHeaders headers()

Return the headers associated with the part.

nameback to summary
public String name()

Return the name of the part in the multipart form.

Returns:String

the name of the part, never null or empty