Class 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 Detail

      • FormDataInserter

        public FormDataInserter()
    • 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
      • isFormData

        protected boolean isFormData​(Invocation invocation)
        Is form data.
        Parameters:
        invocation - the invocation
        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: SingleBodyInserter
        Insert request headers uri spec.
        Specified by:
        insert in class SingleBodyInserter<org.springframework.util.MultiValueMap<String,​?>>
        Parameters:
        body - the body
        requestBodyUriSpec - the request body uri spec
        Returns:
        the request headers uri spec