Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make HTTP client implementation configurable #778

Open
t0m4uk1991 opened this issue Oct 22, 2021 · 1 comment
Open

Make HTTP client implementation configurable #778

t0m4uk1991 opened this issue Oct 22, 2021 · 1 comment

Comments

@t0m4uk1991
Copy link
Contributor

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?

@jmini
Copy link
Collaborator

jmini commented May 2, 2024

This is probably similar to #924

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants