Title HTTP Library Replacement
Student Mieczysław Bąk
Mentor Bryan O'Sullivan
Abstract
== Synopsis ==

   I will provide a libcurl-based[1] replacement library for the Haskell HTTP package[2], utilizing a proven, solid, open-source component in order to fulfill the needs of the Haskell community.


== Details ==

   There have been various concerns voiced about the current implementation, such as that:
 * it provides only a small subset of the features required in a serious HTTP client;
 * it presents a unintuitive set of interfaces, making it hard to write simple, elegant programs[3];
 * it makes use of non-standard error reporting mechanisms[4];
 * it doesn't scale well, due to the inefficiencies inherent in the usage of Strings.

   I aim to solve all these problems and more, by introducing a package enabling the development of both simple and complicated client applications. Key features of my replacement will include:
 * support for multiple network protocols, thanks to libcurl's universality;
 * compatibility with Haskell's threading model;
 * high performance, achieved with the help of ByteString[5];
 * convenient and familiar interfaces.

   I also intend to provide several sample applications, solving common tasks with the aid of the new library.

   I have already done some work towards the project. My goal was to get to know the libcurl API, the Haskell FFI and the ByteString library well enough in order to have a firm grasp of the project's difficulty. I wrote a very simple, proof-of-concept package, supporting a basic URL getter program, over the course of one day. The results are available online[6] on the project's webpage[7].


[1] <http://curl.haxx.se/libcurl/>
[2] <http://www.haskell.org/http/>
[3] <http://darcs.haskell.org/http/test/get.hs>
[4] <http://www.randomhacks.net/articles/2007/03/10/haskell-8-ways-to-report-errors>
[5] <http://www.cse.unsw.edu.au/~dons/fps.html>
[6] <http://varsztat.com/projects/curl/curl-0.0.tar.gz>
[7] <http://varsztat.com/projects/curl/>