Class MultipartDataInserter

  • All Implemented Interfaces:
    BiFunction<Invocation,​org.springframework.web.reactive.function.client.WebClient.RequestBodyUriSpec,​org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec<?>>, RequestBodyInserter

    public class MultipartDataInserter
    extends AbstractRequestBodyInserter
    The multipart data inserter.
    Author:
    Christian Bremer
    • Constructor Detail

      • MultipartDataInserter

        public MultipartDataInserter()
    • Method Detail

      • withContentTypeResolver

        public MultipartDataInserter withContentTypeResolver​(Function<Invocation,​Optional<org.springframework.http.MediaType>> contentTypeResolver)
        With content type resolver.
        Parameters:
        contentTypeResolver - the content type resolver
        Returns:
        the multipart data inserter
      • withPartConverter

        public MultipartDataInserter withPartConverter​(org.springframework.core.convert.converter.Converter<org.springframework.http.codec.multipart.Part,​org.springframework.http.HttpEntity<?>> partConverter)
        With part converter.
        Parameters:
        partConverter - the part converter
        Returns:
        the multipart data inserter
      • isMultipartFormData

        protected boolean isMultipartFormData​(Invocation invocation)
        Is multipart form data.
        Parameters:
        invocation - the invocation
        Returns:
        the boolean
      • isRequestBody

        protected boolean isRequestBody​(InvocationParameter invocationParameter)
        Is request body.
        Parameters:
        invocationParameter - the invocation parameter
        Returns:
        the boolean
      • isRequestPart

        protected boolean isRequestPart​(InvocationParameter invocationParameter)
        Is request part.
        Parameters:
        invocationParameter - the invocation parameter
        Returns:
        the boolean
      • apply

        public org.springframework.web.reactive.function.client.WebClient.RequestHeadersUriSpec<?> apply​(Invocation invocation,
                                                                                                         org.springframework.web.reactive.function.client.WebClient.RequestBodyUriSpec requestBodyUriSpec)