Restler - A simple REST client library for node.js

1,350 views
Skip to first unread message

Dan Webb

unread,
Nov 27, 2009, 7:01:08 AM11/27/09
to nodejs
Hello All,

I've just put out the initial version of Restler on github:
http://github.com/danwrong/restler

Restler is a really simple HTTP client for node.js most suited to
working with REST APIs and the like which smoothes over some of the
complexities in the http.Client API that aren't a concern in many
cases. It deals with URLs, Basic Auth, redirects and the like and
also allows you to automatically deserialize JSON, XML and YAML
responses to javascript objects.

The objective is to make something that can deal with all the web APIs
out there but also be the basis of clients for memcached or CouchDB.
I've had a search around the web prior to building this and hadn't
seen anything around so I thought I'd have a crack. Is there an
equivalent library that I've missed?

It's got a reasonable test suite but its hot of the keyboard so some
of the API change and it probably needs some refactoring but I'd love
to get your feed back or forkage. Let me know what you think.

Cheers,

Dan Webb (@danwrong)

Simon Willison

unread,
Nov 27, 2009, 10:12:07 AM11/27/09
to nodejs
On Nov 27, 12:01 pm, Dan Webb <d...@danwebb.net> wrote:
> I've just put out the initial version of Restler on github:http://github.com/danwrong/restler
> ...
> It's got a reasonable test suite but its hot of the keyboard so some
> of the API change and it probably needs some refactoring but I'd love
> to get your feed back or forkage.  Let me know what you think.

That's fantastic - I can see myself using it a lot. Really nice API
design, and it addresses a definite need (the Node HTTP client can
really do with a bit of syntactic sugar).

Cheers,

Simon

Lachlan Hardy

unread,
Nov 27, 2009, 4:29:08 PM11/27/09
to nod...@googlegroups.com
> Restler is a really simple HTTP client for node.js most suited to
> working with REST APIs and the like which smoothes over some of the
> complexities in the http.Client API that aren't a concern in many
> cases.  It deals with URLs, Basic Auth, redirects and the like and
> also allows you to automatically deserialize JSON, XML and YAML
> responses to javascript objects.

Very cool, Dan! Exactly the kind of library I love. Reminds me a lot
of Smoke in some ways: http://github.com/benschwarz/smoke

I'll definitely be playing with this!

Lachlan
Reply all
Reply to author
Forward
0 new messages