[Haskell-cafe] ANN: HTTPbis / HTTP-4000.x package available
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Sat Jan 17 12:04:46 EST 2009
On Fri, 2009-01-16 at 17:57 +0300, Bulat Ziganshin wrote:
> Hello Sigbjorn,
>
> Friday, January 16, 2009, 5:42:06 PM, you wrote:
>
> first question: are these packages (http, curl, curl-shell, webclient)
> windows-compatible? second - that is advantages of using http (or
> webclient) over curl?
I don't know enough about the others to do a proper comparison, but one
data point is that for cabal-install we picked the HTTP package because
it *does* work on Windows and does not need any C libraries, making it
easy to deploy.
[Packages that require external C libraries are possible on Windows of
course but are a pain. For cabal-install we also use the zlib package
which does need the zlib C lib. Fortunately the zlib C lib is
sufficiently simple that it can be built by Cabal and thus it is
possible to have it bundled with the zlib Haskell package.]
I've not looked at the API of the other packages but the HTTP package
provides the Browser module which makes making sequences of requests
fairly easy. It handles proxies, authentication, redirection etc. With
the latest release it should also be rather quicker than it used to be,
and it fixes problems we used to have with some proxies.
Speaking of proxies, I've been looking into how to find the right proxy
to use on Windows systems. Turns out that to do it properly you need a
JavaScript interpreter! Yes, really. Apparently we have Netscape to
thank for that decision. The easiest way appears to be to link to the MS
WinHTTP lib which provides a couple functions for doing this:
http://hackage.haskell.org/trac/hackage/ticket/460
Duncan
More information about the Haskell-Cafe
mailing list