Eric Tschetter <eched...@gmail.com> writes:

> Last I checked the various clojure libraries, it seemed like noone has
> publicized a set of wrappers/clojure-native implementation of an http
> client.  I'm wonder if such a thing exists, or has everyone basically
> just rolled their own wrapper on top of their favorite Java HTTP
> client library?

Dan Larkin started one a little while ago. I took it and ran with it.

  http://github.com/technomancy/clojure-http-client

It consists of two different namespaces, clojure.http.client and
clojure.http.resourcefully. The client code is lower-level and works
pretty close to the underlying API, while resourcefully is higher-level
and is designed for interacting with REST-based APIs. It handles
persisting cookies and it will raise exceptions on requests that fail
rather than just giving a return code. (Still working on that last bit.)

Documentation is sparse, but I think it's pretty straightforward. It
uses the JDK's HTTPURLConnection internally. Some folks have pointed me
towards the Apache Commons HTTP Client, but I haven't seen much that it
offers over what's built-in to the JDK apart from connection pooling, so
I've been content with what I've got.

Dan has suggested that once it's better-tested and stabilized it could
be submitted to Clojure Contrib. I think that might be a good idea.

Let me know if you find it useful. I would love to get some comments.

-Phil

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to