hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: HttpCore: is there an example for opening HTTPS connections (client side) in the same vein as "ElementalHttpGet.java" ?
Date Fri, 14 Oct 2011 07:57:58 GMT
On Thu, 2011-10-13 at 16:14 -0700, Cardona, Julian wrote:
>     Hi!
>     I've used the code samples from "ElementalHttpGet" and
>     "ElementalHttpPost" for my basic HTTP'ing needs without
>     a glitch so far.  Now I need to open an HTTPS connection
>     and am not sure how to modify those samples to make it
>     work.
>     I've checked the docs and the other examples, no luck
>     there.  The async HTTPS server, for instance, really
>     has a very different flow and is not immediately
>     applicable.  Same goes for HttpClient:  I have to deal
>     regularly with ill-formed responses, so need to have
>     access to a bit lower level data --exactly at the level
>     HttpCore provides it.
>     Any resources (tutorials or code samples) on the specific
>     subject of synchronous, a.k.a. "classic", HTTPS + HttpCore
>     that I might be overlooking?  Thanks in advance!
>     Julian Cardona


DefaultHttpClientConnection can be bound to any arbitrary Socket. You
just need SSLSocketFactory initialized with the required trust and key
material. Once SSLSocket is created it can be bound to a
DefaultHttpClientConnection. See BasicConnFactory for example  




To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org

View raw message