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

public Interface FormPartEvent

extends PartEvent
Known Direct Implementers
org.springframework.http.codec.multipart.DefaultPartEvents.DefaultFormFieldPartEvent
Imports
java.nio.charset.StandardCharsets, java.util.function.Consumer, reactor.core.publisher.Mono, org.springframework.http.ContentDisposition, .HttpHeaders, .MediaType, org.springframework.lang.Nullable, org.springframework.util.Assert

Represents an event triggered for a form field. Contains the value, besides the headers exposed through PartEvent.

Multipart form fields trigger one FormPartEvent, as described here.

Author
Arjen Poutsma
Since
6.0

Method Summary

Modifier and TypeMethod and Description
public static Mono<FormPartEvent>

Returns:

a single event stream
create
(String
the name of the part
name
,
String
the form field value
value
)

Creates a stream with a single FormPartEven based on the given name and value.

public static Mono<FormPartEvent>

Returns:

a single event stream
create
(String
the name of the part
name
,
String
the form field value
value
,
Consumer<HttpHeaders>
used to change default headers. Can be null.
headersConsumer
)

Creates a stream with a single FormPartEven based on the given name and value.

public String
value()

Return the form field value.

Inherited from org.springframework.http.codec.multipart.PartEvent:
contentheadersisLastname

Method Detail

createback to summary
public static Mono<FormPartEvent> create(String name, String value)

Creates a stream with a single FormPartEven based on the given name and value.

Parameters
name:String

the name of the part

value:String

the form field value

Returns:Mono<FormPartEvent>

a single event stream

createback to summary
public static Mono<FormPartEvent> create(String name, String value, Consumer<HttpHeaders> headersConsumer)

Creates a stream with a single FormPartEven based on the given name and value.

Parameters
name:String

the name of the part

value:String

the form field value

headersConsumer:Consumer<HttpHeaders>

used to change default headers. Can be null.

Returns:Mono<FormPartEvent>

a single event stream

valueback to summary
public String value()

Return the form field value.