[Haskell-cafe] Network.Curl and posting XML data

Erik de Castro Lopo mle+hs at mega-nerd.com
Wed Oct 7 06:37:38 EDT 2009


mf-hcafe-15c311f0c at etc-network.de wrote:

> I am not aware of any SSL implementation in haskell either (even

I really find this rather surprising. Ocaml has a very decent wrapper
around Openssl that works rather well so it can't be that hard.
 
> though I think it should go not into HTTP but into Crypto (which is a
> neat piece of code, but needs a lot more work)).

But why shouldn't it should go into Network.HTTP? All I want to do
is a HTTP POST of text/xml data to a HTTPS server and retrieve the
text/xml data response and the HTTP response code. Whether that 
URL is HTTP vs HTTPS shouldn't matter.

With a sane API I should just be able to change from a HTTP url to 
a HTTPS url and have it JustWork (tm). To have to use a different
library depending on whether I'm doing http vs https is just
horrible.

> I can think of two "quick" solutions if you need your Haskell code to
> use an SSL link: run stunnel.org

Sorry, thats way too cludgy for my application.

> and make your application connect to
> that, or write a Haskell wrapper around openssl.org.

I've used openssl directly from C and C++ so  I know its doable, but
I consider openssl a real blemish on the FOSS world.

There is however this:

   http://hackage.haskell.org/packages/archive/HsOpenSSL/0.6.5/doc/html/OpenSSL-Session.html

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the Haskell-Cafe mailing list