Class AbstractClientHttpRequest

  • java.lang.Object
    • org.springframework.http.client.reactive.AbstractClientHttpRequest
    • Constructor Detail

      • AbstractClientHttpRequest

        public AbstractClientHttpRequest()
      • AbstractClientHttpRequest

        public AbstractClientHttpRequest(HttpHeaders headers)
    • Method Detail

      • getHeaders

        public HttpHeaders getHeaders()
        Description copied from interface: HttpMessage
        Return the headers of this message.
        Specified by:
        getHeaders in interface HttpMessage
        a corresponding HttpHeaders object (never null)
      • beforeCommit

        public void beforeCommit(java.util.function.Supplier<? extends reactor.core.publisher.Mono<java.lang.Void>> action)
        Description copied from interface: ReactiveHttpOutputMessage
        Register an action to apply just before the HttpOutputMessage is committed.

        Note: the supplied action must be properly deferred, e.g. via Mono.defer(java.util.function.Supplier<? extends reactor.core.publisher.Mono<? extends T>>) or Mono.fromRunnable(java.lang.Runnable), to ensure it's executed in the right order, relative to other actions.

        Specified by:
        beforeCommit in interface ReactiveHttpOutputMessage
        action - the action to apply
      • doCommit

        protected reactor.core.publisher.Mono<java.lang.Void> doCommit()
        A variant of doCommit(Supplier) for a request without body.
        a completion publisher
      • doCommit

        protected reactor.core.publisher.Mono<java.lang.Void> doCommit(@Nullable
                                                                       java.util.function.Supplier<? extends org.reactivestreams.Publisher<java.lang.Void>> writeAction)
        Apply beforeCommit actions, apply the request headers/cookies, and write the request body.
        writeAction - the action to write the request body (may be null)
        a completion publisher
      • applyHeaders

        protected abstract void applyHeaders()
        Apply header changes from getHeaders() to the underlying response. This method is called once only.
      • applyCookies

        protected abstract void applyCookies()
        Add cookies from getHeaders() to the underlying response. This method is called once only.