Interface Client

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
HttpComponentsClient

public interface Client extends Closeable
Abstraction around underlying Http Client library. Allows for replacing the underlying library in the future if needed.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the Client implementation and release any resources it may have open.
    executeRequest(Request<?> request)
    Execute the supplied request and return the server's response.
  • Method Details

    • executeRequest

      HttpResult executeRequest(Request<?> request)
      Execute the supplied request and return the server's response.
      Parameters:
      request - The request to execute.
      Returns:
      The API response.
    • close

      void close()
      Close the Client implementation and release any resources it may have open.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable