Class FormDataInserter
- java.lang.Object
-
- org.bremersee.apiclient.webflux.contract.spring.AbstractRequestBodyInserter
-
- org.bremersee.apiclient.webflux.contract.spring.SingleBodyInserter<org.springframework.util.MultiValueMap<String,?>>
-
- org.bremersee.apiclient.webflux.contract.spring.FormDataInserter
-
- All Implemented Interfaces:
BiFunction<Invocation,org.springframework.web.reactive.function.client.WebClient.RequestBodyUriSpec,org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec<?>>,RequestBodyInserter
public class FormDataInserter extends SingleBodyInserter<org.springframework.util.MultiValueMap<String,?>>
The form data inserter.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description FormDataInserter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanInsert(Invocation invocation)Can insert boolean.protected org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec<?>insert(org.springframework.util.MultiValueMap<String,?> body, org.springframework.web.reactive.function.client.WebClient.RequestBodyUriSpec requestBodyUriSpec)Insert request headers uri spec.protected booleanisFormData(Invocation invocation)Is form data.protected booleanisPossibleBodyValue(InvocationParameter invocationParameter)Is possible body value boolean.protected org.springframework.util.MultiValueMap<String,?>mapBody(InvocationParameter invocationParameter)Map body.FormDataInserterwithContentTypeResolver(Function<Invocation,Optional<org.springframework.http.MediaType>> contentTypeResolver)With content type resolver.-
Methods inherited from class org.bremersee.apiclient.webflux.contract.spring.SingleBodyInserter
apply
-
Methods inherited from class org.bremersee.apiclient.webflux.contract.spring.AbstractRequestBodyInserter
canInsert, findPossibleBodies, hasMappingAnnotation, isPossibleBody
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Method Detail
-
withContentTypeResolver
public FormDataInserter withContentTypeResolver(Function<Invocation,Optional<org.springframework.http.MediaType>> contentTypeResolver)
With content type resolver.- Parameters:
contentTypeResolver- the content type resolver- Returns:
- the form data inserter
-
canInsert
public boolean canInsert(Invocation invocation)
Description copied from interface:RequestBodyInserterCan insert boolean.- Specified by:
canInsertin interfaceRequestBodyInserter- Overrides:
canInsertin classAbstractRequestBodyInserter- Parameters:
invocation- the invocation- Returns:
- the boolean
-
isFormData
protected boolean isFormData(Invocation invocation)
Is form data.- Parameters:
invocation- the invocation- Returns:
- the boolean
-
mapBody
protected org.springframework.util.MultiValueMap<String,?> mapBody(InvocationParameter invocationParameter)
Description copied from class:SingleBodyInserterMap body.- Specified by:
mapBodyin classSingleBodyInserter<org.springframework.util.MultiValueMap<String,?>>- Parameters:
invocationParameter- the invocation parameter- Returns:
- the t
-
isPossibleBodyValue
protected boolean isPossibleBodyValue(InvocationParameter invocationParameter)
Description copied from class:AbstractRequestBodyInserterIs possible body value boolean.- Specified by:
isPossibleBodyValuein classSingleBodyInserter<org.springframework.util.MultiValueMap<String,?>>- Parameters:
invocationParameter- the invocation parameter- Returns:
- the boolean
-
insert
protected org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec<?> insert(org.springframework.util.MultiValueMap<String,?> body, org.springframework.web.reactive.function.client.WebClient.RequestBodyUriSpec requestBodyUriSpec)
Description copied from class:SingleBodyInserterInsert request headers uri spec.- Specified by:
insertin classSingleBodyInserter<org.springframework.util.MultiValueMap<String,?>>- Parameters:
body- the bodyrequestBodyUriSpec- the request body uri spec- Returns:
- the request headers uri spec
-
-