Class JenkinsHttpClient

java.lang.Object
io.jenkins.plugins.hiddenlayer.JenkinsHttpClient
All Implemented Interfaces:
com.hiddenlayer.api.core.http.HttpClient, AutoCloseable

public class JenkinsHttpClient extends Object implements com.hiddenlayer.api.core.http.HttpClient
Custom HttpClient implementation based on the SDK's OkHttpClient. Adds support for proxy authentication via OkHttp's proxyAuthenticator.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
     
    com.hiddenlayer.api.core.http.HttpResponse
    execute(com.hiddenlayer.api.core.http.HttpRequest request, com.hiddenlayer.api.core.RequestOptions requestOptions)
     
    CompletableFuture<com.hiddenlayer.api.core.http.HttpResponse>
    executeAsync(com.hiddenlayer.api.core.http.HttpRequest request, com.hiddenlayer.api.core.RequestOptions requestOptions)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.hiddenlayer.api.core.http.HttpClient

    execute, executeAsync
  • Method Details

    • execute

      public com.hiddenlayer.api.core.http.HttpResponse execute(com.hiddenlayer.api.core.http.HttpRequest request, com.hiddenlayer.api.core.RequestOptions requestOptions)
      Specified by:
      execute in interface com.hiddenlayer.api.core.http.HttpClient
    • executeAsync

      public CompletableFuture<com.hiddenlayer.api.core.http.HttpResponse> executeAsync(com.hiddenlayer.api.core.http.HttpRequest request, com.hiddenlayer.api.core.RequestOptions requestOptions)
      Specified by:
      executeAsync in interface com.hiddenlayer.api.core.http.HttpClient
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface com.hiddenlayer.api.core.http.HttpClient
    • builder

      public static JenkinsHttpClient.Builder builder()