类 AbstractClientHttpRequest

java.lang.Object
cn.taketoday.http.client.reactive.AbstractClientHttpRequest
所有已实现的接口:
ClientHttpRequest, HttpMessage, ReactiveHttpOutputMessage
直接已知子类:
HttpComponentsClientHttpRequest, JdkClientHttpRequest, JettyClientHttpRequest, ReactorClientHttpRequest, ReactorNetty2ClientHttpRequest

public abstract class AbstractClientHttpRequest extends Object implements ClientHttpRequest
Base class for ClientHttpRequest implementations.
从以下版本开始:
4.0
作者:
Rossen Stoyanchev, Brian Clozel
  • 字段详细资料

  • 构造器详细资料

    • AbstractClientHttpRequest

      public AbstractClientHttpRequest()
    • AbstractClientHttpRequest

      public AbstractClientHttpRequest(HttpHeaders headers)
  • 方法详细资料

    • getHeaders

      public HttpHeaders getHeaders()
      从接口复制的说明: HttpMessage
      Return the headers of this message.
      指定者:
      getHeaders 在接口中 HttpMessage
      返回:
      a corresponding HttpHeaders object (never null)
    • initReadOnlyHeaders

      protected HttpHeaders initReadOnlyHeaders()
      Initialize the read-only headers after the request is committed.

      By default, this method simply applies a read-only wrapper. Subclasses can do the same for headers from the native request.

    • getCookies

      public cn.taketoday.util.MultiValueMap<String,HttpCookie> getCookies()
      从接口复制的说明: ClientHttpRequest
      Return a mutable map of request cookies to send to the server.
      指定者:
      getCookies 在接口中 ClientHttpRequest
    • beforeCommit

      public void beforeCommit(Supplier<? extends reactor.core.publisher.Mono<Void>> action)
      从接口复制的说明: 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.

      指定者:
      beforeCommit 在接口中 ReactiveHttpOutputMessage
      参数:
      action - the action to apply
    • isCommitted

      public boolean isCommitted()
      从接口复制的说明: ReactiveHttpOutputMessage
      Whether the HttpOutputMessage is committed.
      指定者:
      isCommitted 在接口中 ReactiveHttpOutputMessage
    • doCommit

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

      protected reactor.core.publisher.Mono<Void> doCommit(@Nullable Supplier<? extends org.reactivestreams.Publisher<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 request. This method is called once only.
    • applyCookies

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