Interface WebClientServiceRequest


public interface WebClientServiceRequest
Request to SPI WebClientService that supports modification of the outgoing request.
  • Method Details

    • uri

      ClientUri uri()
      URI helper for this client request.
      Returns:
      URI helper
    • method

      Method method()
      Returns an HTTP request method. See also HTTP standard methods utility class.
      Returns:
      an HTTP method
      See Also:
    • protocolId

      String protocolId()
      Returns an HTTP protocol ID, mapped to a specific version. This is the same ID that is used for ALPN (protocol negotiation) - http/1.1 for HTTP/1.1 and h2 for HTTP/2.

      If communication starts as a HTTP/1.1 with h2c upgrade, then it will be automatically upgraded and this method returns HTTP/2.0.

      Returns:
      an HTTP version
    • headers

      Configured request headers.
      Returns:
      headers (mutable)
    • context

      Context context()
      Registry that can be used to propagate information from server (e.g. security context, tracing spans etc.).
      Returns:
      registry propagated by the user
    • requestId

      String requestId()
      Request id which will be used in logging messages.
      Returns:
      current request id
    • requestId

      void requestId(String requestId)
      Set new request id. This id is used in logging messages.
      Parameters:
      requestId - new request id
    • whenSent

      Completes when the request part of this request is done (e.g. we have sent all headers and bytes).
      Returns:
      completion stage that finishes when we fully send request (including entity) to server
    • whenComplete

      Completes when the full processing of this request is done (e.g. we have received a full response).
      Returns:
      completion stage that finishes when we receive and fully read response from the server
    • properties

      Map<String,String> properties()
      Properties configured by user when creating this client request.
      Returns:
      properties that were configured (mutable)