Interface HttpClient<REQ extends ClientRequest<REQ>>

Type Parameters:
REQ - type of the client request
All Superinterfaces:
ReleasableResource
All Known Subinterfaces:
Http1Client, Http2Client, WebClient
All Known Implementing Classes:
DirectClient, DirectWebClient

public interface HttpClient<REQ extends ClientRequest<REQ>> extends ReleasableResource
HTTP client.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Gracefully close all opened client specific connections.
    default REQ
    Shortcut for delete method with default path.
    default REQ
    Shortcut for delete method with a path.
    default REQ
    get()
    Shortcut for get method with default path.
    default REQ
    get(String uri)
    Shortcut for get method with a path.
    default REQ
    Shortcut for head method with default path.
    default REQ
    head(String uri)
    Shortcut for head method with a path.
    method(Method method)
    Create a request for a method.
    default REQ
    Shortcut for options method with default path.
    default REQ
    Shortcut for options method with a path.
    default REQ
    Shortcut for patch method with default path.
    default REQ
    Shortcut for patch method with a path.
    default REQ
    Shortcut for post method with default path.
    default REQ
    post(String uri)
    Shortcut for post method with a path.
    default REQ
    put()
    Shortcut for put method with default path.
    default REQ
    put(String uri)
    Shortcut for put method with a path.
    default REQ
    Shortcut for trace method with default path.
    default REQ
    Shortcut for trace method with a path.

    Methods inherited from interface io.helidon.webclient.api.ReleasableResource

    releaseResource
  • Method Details

    • method

      REQ method(Method method)
      Create a request for a method.
      Parameters:
      method - HTTP method
      Returns:
      a new request (not thread safe)
    • closeResource

      default void closeResource()
      Gracefully close all opened client specific connections.
      Specified by:
      closeResource in interface ReleasableResource
    • get

      default REQ get(String uri)
      Shortcut for get method with a path.
      Parameters:
      uri - path to resolve against base URI, or full URI
      Returns:
      a new request (not thread safe)
    • get

      default REQ get()
      Shortcut for get method with default path.
      Returns:
      a new request (not thread safe)
    • post

      default REQ post(String uri)
      Shortcut for post method with a path.
      Parameters:
      uri - path to resolve against base URI, or full URI
      Returns:
      a new request (not thread safe)
    • post

      default REQ post()
      Shortcut for post method with default path.
      Returns:
      a new request (not thread safe)
    • put

      default REQ put(String uri)
      Shortcut for put method with a path.
      Parameters:
      uri - path to resolve against base URI, or full URI
      Returns:
      a new request (not thread safe)
    • put

      default REQ put()
      Shortcut for put method with default path.
      Returns:
      a new request (not thread safe)
    • delete

      default REQ delete(String uri)
      Shortcut for delete method with a path.
      Parameters:
      uri - path to resolve against base URI, or full URI
      Returns:
      a new request (not thread safe)
    • delete

      default REQ delete()
      Shortcut for delete method with default path.
      Returns:
      a new request (not thread safe)
    • head

      default REQ head(String uri)
      Shortcut for head method with a path.
      Parameters:
      uri - path to resolve against base URI, or full URI
      Returns:
      a new request (not thread safe)
    • head

      default REQ head()
      Shortcut for head method with default path.
      Returns:
      a new request (not thread safe)
    • options

      default REQ options(String uri)
      Shortcut for options method with a path.
      Parameters:
      uri - path to resolve against base URI, or full URI
      Returns:
      a new request (not thread safe)
    • options

      default REQ options()
      Shortcut for options method with default path.
      Returns:
      a new request (not thread safe)
    • trace

      default REQ trace(String uri)
      Shortcut for trace method with a path.
      Parameters:
      uri - path to resolve against base URI, or full URI
      Returns:
      a new request (not thread safe)
    • trace

      default REQ trace()
      Shortcut for trace method with default path.
      Returns:
      a new request (not thread safe)
    • patch

      default REQ patch(String uri)
      Shortcut for patch method with a path.
      Parameters:
      uri - path to resolve against base URI, or full URI
      Returns:
      a new request (not thread safe)
    • patch

      default REQ patch()
      Shortcut for patch method with default path.
      Returns:
      a new request (not thread safe)