private static class BodyInserters.DefaultMultipartInserter extends java.lang.Object implements BodyInserters.MultipartInserter
BodyInserter.Context
Modifier and Type | Field and Description |
---|---|
private MultipartBodyBuilder |
builder |
Modifier | Constructor and Description |
---|---|
private |
DefaultMultipartInserter() |
Modifier and Type | Method and Description |
---|---|
<any> |
insert(ClientHttpRequest outputMessage,
BodyInserter.Context context)
Insert into the given output message.
|
BodyInserters.MultipartInserter |
with(MultiValueMap<java.lang.String,java.lang.Object> values)
Adds the specified values to the form.
|
BodyInserters.MultipartInserter |
with(java.lang.String key,
java.lang.Object value)
Adds the specified key-value pair to the form.
|
private BodyInserters.MultipartInserter |
withInternal(MultiValueMap<java.lang.String,?> values) |
<T,P extends <any>> |
withPublisher(java.lang.String name,
P publisher,
java.lang.Class<T> elementClass)
Add an asynchronous part with
Publisher -based content. |
<T,P extends <any>> |
withPublisher(java.lang.String name,
P publisher,
ParameterizedTypeReference<T> typeReference)
Variant of
#withPublisher(String, Publisher, Class) that accepts a
ParameterizedTypeReference for the element type, which allows
specifying generic type information. |
private final MultipartBodyBuilder builder
public BodyInserters.MultipartInserter with(java.lang.String key, java.lang.Object value)
BodyInserters.FormInserter
with
in interface BodyInserters.FormInserter<java.lang.Object>
key
- the key to be addedvalue
- the value to be addedpublic BodyInserters.MultipartInserter with(MultiValueMap<java.lang.String,java.lang.Object> values)
BodyInserters.FormInserter
with
in interface BodyInserters.FormInserter<java.lang.Object>
values
- the values to be addedprivate BodyInserters.MultipartInserter withInternal(MultiValueMap<java.lang.String,?> values)
public <T,P extends <any>> BodyInserters.MultipartInserter withPublisher(java.lang.String name, P publisher, java.lang.Class<T> elementClass)
BodyInserters.MultipartInserter
Publisher
-based content.withPublisher
in interface BodyInserters.MultipartInserter
name
- the name of the part to addpublisher
- the part contentselementClass
- the type of elements contained in the publisherpublic <T,P extends <any>> BodyInserters.MultipartInserter withPublisher(java.lang.String name, P publisher, ParameterizedTypeReference<T> typeReference)
BodyInserters.MultipartInserter
#withPublisher(String, Publisher, Class)
that accepts a
ParameterizedTypeReference
for the element type, which allows
specifying generic type information.withPublisher
in interface BodyInserters.MultipartInserter
name
- the key to be addedpublisher
- the publisher to be added as valuetypeReference
- the type of elements contained in publisher
public <any> insert(ClientHttpRequest outputMessage, BodyInserter.Context context)
BodyInserter
insert
in interface BodyInserter<MultiValueMap<java.lang.String,java.lang.Object>,ClientHttpRequest>
outputMessage
- the response to insert intocontext
- the context to useMono
that indicates completion or error