On Thu, 2019-03-21 at 14:11 +0000, Andrew Hardy wrote: > Oleg, > > I'm a bit confused. Just to clarify. Are you saying stock versions > of Apache > HttpClient 4.5 and 5.0 "should" run on Android anyway? Why are you > doing > the port if that's still a possibility?
1. Apache HttpClient 4.5 HttpClient 4.5 is _almost_ compatible with Android API 26 or later. The trouble-maker is org.apache.http.conn.ssl.DefaultHostnameVerifier that depends on javax.naming APIs unsupported by Android It is _incompatible_ with earlier versions of Android API (< 26) and there is nothing that can be done about it. My project basically replaces the DefaultHostnameVerifier class with a fork back-ported from Apache HttpClient 5.0 and adds a few minor utility classes https://github.com/ok2c/httpclient-android-ext 2. Apache HttpClient 5.0 Apache HttpClient 5.0 _should_ be fully compatible with all common Android API versions. There used to be troubles with the logging code in HttpClient 5.0, so before I can declare it fully compatible I want to thoroughly test it. > Or do you mean they are "since" > the port and they actually support both platforms? > > You say core was folded into Android client, but presumably you don't > mean > "all" of it? If my memory still serves NIO and server-side code got dropped. What is it that you think is missing? > My post is about something I didn't find to be folded in. > > Finally you suggest core 5.0 should behave with Android. I am using > maven > central and I don't see 5.0. do you mean 5.0 beta and I have to > download > the jar and make the dependency reference the file rather than > remote? > https://search.maven.org/artifact/org.apache.httpcomponents.core5/httpcore5/5.0-beta7/jar <dependency> <groupId>org.apache.httpcomponents.core5</groupId> <artifactId>httpcore5</artifactId> <version>5.0-beta7</version> </dependency> Hope this helps Oleg > Sorry. Hope this makes sense. I am still a novice in this area. > > Very kind regards, > > Andrew. > > > > > > > On March 20, 2019 14:39:27 Oleg Kalnichevski <ol...@apache.org> > wrote: > > > On Wed, 2019-03-20 at 00:20 +0000, Andrew Hardy wrote: > > > I think HttpClient for Android uses org.apache.http.namevaluepair > > > defined > > > in HttpCore for some methods of its class URLEncodedUtilsHC4. > > > However, I > > > can find no Android version of HttpCore. How, therefore, do I use > > > methods > > > of URLEncodedUtilsHC4 in Android or are there any alternatives? > > > In > > > particular the equivalent use parse methods. > > > > > > > > > > > > > > > Hope this makes proper sense, or maybe I have misunderstood > > > things. > > > > > > > > > > > > > > > Many thanks, > > > > > > > > > > > > > > > Andrew. > > > > Hi Andrew > > > > HttpCore code got folded into Android distribution of HttpClient > > for > > the sake of simplicity. > > > > I am presently working on making sure that stock versions of Apache > > HttpClient 4.5 and 5.0 could be run on Android without any > > modifications but I have been doing all this work outside ASF as my > > own > > personal project. > > > > In your case I would just recommend using Apache HttpCore 5.0 which > > should just work on Android out of the box. > > > > Cheers > > > > Oleg > > > > > > ----------------------------------------------------------------- > > ---- > > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > > For additional commands, e-mail: dev-h...@hc.apache.org > > > Sent with AquaMail for Android > https://www.mobisystems.com/aqua-mail > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org > For additional commands, e-mail: dev-h...@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org