Skip to content

Make HTTP client implementation configurable  #778

@t0m4uk1991

Description

@t0m4uk1991

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions