Class HankoHttpClientBase

java.lang.Object
io.hanko.sdk.http.HankoHttpClientBase
Direct Known Subclasses:
HankoHttpClient

public abstract class HankoHttpClientBase extends Object
Abstract base client that performs actual requests to the Hanko API.
  • Constructor Details

    • HankoHttpClientBase

      protected HankoHttpClientBase(HankoClientConfig config, org.apache.http.impl.client.CloseableHttpClient httpClient)
      Base constructor.
      Parameters:
      config - a HankoClientConfig
      httpClient - a CloseableHttpClient
  • Method Details

    • makeRequest

      protected HankoHttpResponse makeRequest(HttpMethod method, String path)
      Performs a request without a request body to the Hanko API.
      Parameters:
      method - the HttpMethod for the request
      path - the API endpoint path as a String
      Returns:
      a HankoHttpResponse
    • makeRequest

      protected HankoHttpResponse makeRequest(HttpMethod method, String path, String body)
      Performs a request with a request body to the Hanko API.
      Parameters:
      method - the HttpMethod for the request
      path - the API endpoint path as a String
      body - nullable, the request body as a String
      Returns:
      a HankoHttpResponse
      Throws:
      HankoApiConnectionException - - if an error occurs connecting to the Hanko API
      HankoClientException - - if an error occurs during authorization header construction
    • getLogger

      protected abstract org.slf4j.Logger getLogger()
      Get a logger
      Returns:
      the Logger