[Haskell-cafe] HTTP client libraries

Thomas Schilling nominolo at googlemail.com
Thu Mar 27 16:19:53 EDT 2008

On 27 mar 2008, at 20.08, John Goerzen wrote:

> Hi folks,
> I was recently looking for HTTP client libraries for Haskell.  I
> investigated several, and it seems that there aren't any really ready
> for primetime.  Am I missing anything?  Here's what I found:
> * Bjorn's String-based HTTP
>   It eats RAM.  Does not appear to read data lazily, returns a String,
>   and may have a memory leak as well.  Does not appear to be suited
>   for anything except very small file downloads.
> * nominolo's ByteString port of Bjorn's HTTP
>   Appears to exist only in a darcs repo linked from his personal blog.
>   Makes me hesitant to use it in production code, for fear that it
>   won't be around long-term.

No, it also leaks handles.  I am now convinced that a fold/enumerator- 
based interface is the best solution but haven't gotten around to  
implementing it.  It also isn't particularly well-tested (closer to  
not at all).  It was a proof-of-concept (and to test what  
improvements are possible), but we never had the time or energy to  
complete it.

> * tagsoup
>   Broken in many ways.  Does not support chunked encoding that is
>   mandated by HTTP RFC.  Will be incompatible with numerous HTTP
>   servers, and the manual states as much.  Port 80 hardcoded.
> * network-minihttp
>   Doesn't appear to actually be very useful as a client.
> Also, as far as I have been able to deduce, none of these have
> built-in support for https (SSL) URLs.
> There is also a Curl binding (or two?) floating around, which I
> haven't investigated.  It would be nicer to have a native Haskell
> solution.  Or should I just go write one?

It would be a good summer of code project, but I don't know if  
someone will apply for it.  Also, if you need it right now (or want  
to refer to a reliable implementation in your book) you probably  
don't want to count on that to work out.

> -- John
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list