YACLHTTPAPI

So, I wrote a new HTTP client package for Common Lisp. I know, there are already a bunch, but they all seem to be pretty limited in their functionality (yes, even the one in Closure).

For one, they expect character content, which is fine when you\’re trying to load a Web page (as long as it\’s in the encoding the client expects) but not so much when you\’re dealing with binary data. There also isn\’t much support for \”Transfer-Encoding: chunked\”. Closure does that, I think, but no one else. I also have some other nice features:

So, I needed to handle both binary data and chunked encoding for what I\’m doing at work. I figured I might as well take some time to make a full implementation of RFC 2616. It\’s not quite perfect yet, so here\’s a list of the known shortcomings:

  • sometimes the content is returned as a byte vector, other times as a stream;
  • no parsing of date headers (I\’ll probably just steal this from Closure);
  • it might be nice to return a string in cases where we have a Content-Type (but this might just add confusion); and
  • handling other header fields.

None of these things prevents it from complying with RFC 2616, though (I think). So, it\’s just a matter of making it more user-friendly at this point. I\’d appreciate any feedback. There\’s just the darcs repository now, but I\’ll make this into a CLNet project if people are interested.

2 Responses to “YACLHTTPAPI”

  1. Edi Weitz Says:

    Other Lisp web clients which do chunked encoding and other HTTP/1.1 stuff:

    1. DO-HTTP-REQUEST in (Portable) AllegroServe

    2. Drakma (http://weitz.de/drakma/), does binary data as well.

    Cheers, Edi.

  2. Nowhere Man Says:

    I think it would be a good idea to list implementations of protocols, along with what they respect or not… That would help users and developpers know how to choose a library and when it’s appropriate to write one.

Leave a Reply