HTTP client in Ring?

19 views
Skip to first unread message

Daniel Janus

unread,
Jul 23, 2010, 7:33:36 AM7/23/10
to Ring
Dear all,

Has it been considered to add a HTTP client to Ring?

I've written one that uses Jetty-client (6.1.24, as I depend on some
new features -- NB: Ring 0.2.5 currently uses Jetty 6.1.14, which is a
bit outdated; perhaps it's time for an upgrade?) My implementation
builds on the Ring spec, and currently consists of one function that
takes a Ring request, posts it to the remote server, waits for
response and returns it in Ring response format.

If it is of interest, I can make a gist of it for public review.

Thanks,
Daniel Janus

Mark McGranaghan

unread,
Jul 23, 2010, 10:04:26 PM7/23/10
to ring-c...@googlegroups.com
Hi Daniel,

Sounds neat. I've heard several people mention this in passing but
don't recall a public implementation anywhere. I'd love to see what
you've come up.

I like the symmetry of getting responses in Ring-style maps.
Ultimately it is just an interface concern, so one could wrap any Java
or Clojure HTTP clients in such an interface. Indeed, I think the best
way to go about this would be to start from the most mature Clojure or
Java HTTP library and layer on top of it.

- Mark

Daniel Janus

unread,
Jul 25, 2010, 9:47:21 AM7/25/10
to Ring
On 24 Lip, 04:04, Mark McGranaghan <mmcgr...@gmail.com> wrote:

> Hi Daniel,
>
> Sounds neat. I've heard several people mention this in passing but
> don't recall a public implementation anywhere. I'd love to see what
> you've come up.

Here's my take: http://gist.github.com/479867

Best regards,
Daniel
Reply all
Reply to author
Forward
0 new messages