Skip to content

AndroidEnterpriseClient doesn't work with HttpClient instance obtained from HttpClients.customs method #364

@mailniranjan

Description

@mailniranjan

CloseableHttpClient closeableHttpClient = HttpClients.custom()...build();
ApacheHttpTransport apacheHttpTransport = new ApacheHttpTransport(closeableHttpClient);
AndroidEnterprise enterpriseClient = new AndroidEnterprise.Builder(apacheHttpTransport, ...);
AndroidEnterprise.Products.List listProducts = enterpriseClient.products().list(enterpriseId);

The above piece of code throws the following exception.
java.lang.UnsupportedOperationException
at org.apache.http.impl.client.InternalHttpClient.getParams(InternalHttpClient.java:210)
at com.google.api.client.http.apache.ApacheHttpTransport.(ApacheHttpTransport.java:129)

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions