Class ApacheHttpClient

java.lang.Object
io.karatelabs.http.ApacheHttpClient
All Implemented Interfaces:
HttpClient, Closeable, AutoCloseable, org.apache.hc.core5.http.HttpRequestInterceptor

public class ApacheHttpClient extends Object implements HttpClient, org.apache.hc.core5.http.HttpRequestInterceptor
  • Constructor Details

    • ApacheHttpClient

      public ApacheHttpClient()
  • Method Details

    • config

      public void config(String key, Object value)
      Specified by:
      config in interface HttpClient
    • invoke

      public HttpResponse invoke(HttpRequest request)
      Specified by:
      invoke in interface HttpClient
    • abort

      public void abort()
      Specified by:
      abort in interface HttpClient
    • process

      public void process(org.apache.hc.core5.http.HttpRequest hr, org.apache.hc.core5.http.EntityDetails entity, org.apache.hc.core5.http.protocol.HttpContext context)
      Specified by:
      process in interface org.apache.hc.core5.http.HttpRequestInterceptor
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Throws:
      IOException