Skip to content
This repository was archived by the owner on Apr 5, 2022. It is now read-only.
This repository was archived by the owner on Apr 5, 2022. It is now read-only.

Get rid of org.apache.http.legacy #31

Description

@MasterEmit

We are using at the moment Apache Android HttpClient 4.3.5.1. Sadly we still need useLibrary 'org.apache.http.legacy' to be able to build.

We need HttpComponentsStreamingClientHttpRequest - otherwise we would switch to okHttpClient.

If we remove legacy apache library and add in addition "org.apache.httpcomponents:core:4.3.3", then we get compile errors for following code:

private void setTemplateRequestFactory(RestTemplate template, CloseableHttpClient httpClient, boolean isSupportLargeRequests) {
        HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(httpClient);
        requestFactory.setBufferRequestBody(!isSupportLargeRequests);
        template.setRequestFactory(requestFactory);
    }

The constructor of HttpComponentsClientHttpRequestFactory needs HttpClient - which is just available inside legacy apache http client. Would it be possible to remove this dependency?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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