gitlab4j-api icon indicating copy to clipboard operation
gitlab4j-api copied to clipboard

Make HTTP client implementation configurable

Open t0m4uk1991 opened this issue 4 years ago • 1 comments

The current implementation of GitLabApiClient does not provide a simple and easy way to configure/customize HTTP client.

So to fix this problem, we need to make the HTTP client pluggable.

To do this we need to:

  1. Make HTTP client implementation pluggable during GitLabApi creation
  2. Extract public contract of GitLabApiClient to separate interface.
  3. Provide interface implementation with other clients (at least okhttp)

Now we depend on implementation of javax.ws.rs.client.Client interface, so we can provide the implementation of this interface with OkHttp client (not sure here, maybe the better solution is to remove dependency on the Client interface and add a custom one)

@jabby Do we have any concerns about these changes?

t0m4uk1991 avatar Oct 22 '21 16:10 t0m4uk1991

This is probably similar to https://github.com/gitlab4j/gitlab4j-api/issues/924

jmini avatar May 02 '24 05:05 jmini