I work in ruby and tend to use Faraday
https://github.com/lostisland/faraday
It gives you a consistent interface over multiple client libs via adapters, and it enables the use of rack middleware in the request response cycle.
Hactor is my API for writing hypermedia clients. It's built on top of Faraday:
https://github.com/mikekelly/hactor
Cheers,
M
On 9 Apr 2013 10:21, "Kevin Swiber" <ksw...@gmail.com> wrote:
>
> What's your favorite HTTP client library? Any language, any platform. I love them all. :)
I work in ruby and tend to use Faraday
https://github.com/lostisland/faraday
It gives you a consistent interface over multiple client libs via adapters, and it enables the use of rack middleware in the request response cycle.
Hactor is my API for writing hypermedia clients. It's built on top of Faraday:
--
You received this message because you are subscribed to the Google Groups "API Craft" group.
To unsubscribe from this group and stop receiving emails from it, send an email to api-craft+...@googlegroups.com.
Visit this group at http://groups.google.com/group/api-craft?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Speaking more generally for a moment, I don't like object mapping approaches (such as those used in Spring Social, Jackson databind, etc.). I've found that mapping flexible data structures (i.e. JSON, XML and friends) to hard coded static class models imposes big costs in terms of system evolvability, without a commensurate benefit. Even in languages like Java I prefer reading JSON, XML, etc. into the language's equivalent data structures (i.e. lists, maps and primitives in Java) and processing it there.
Years ago I built the resourceful[1] library for ruby because there just were not any other good HTTP clients for ruby at the time. Things are a little better now in that regard but I still think resourceful is one of the best HTTP libs for ruby. Good things it has:
* client side caching
* automatic redirection following (Any client that doesn't have this is broken. Period.)
* gzip transfer encoding
* pluggable authentication handling (ships with basic and digest support)
Things l'd like that are missing
* futures based responses for easily handling concurrent requests
* good proxy support
[1]: https://github.com/paul/resourceful
Peter
Barelyenough.org
Hi API craft community
We use Webshell.io a HTTP layer based on the http module of node.js. (actually we have build it ;)
Webshell.io is an API that executes Javascript on top of Node.js with a collaborative framework for client-side and server-side APIs.
It is a Javascript-as-a-Service platform for APIs.
As a HTTP client library (from browser or server call) we support :
- minimal and simple http request: get(“myurl.com”);
- Post files and buffers
- XML or JSON answer
- redirection follow
- multipart mixed in multipart form data (like email format or opera file sending)
- Authentication of the request (query auth, http basic auth, oauth 1 & 2...)
- browser request
- Requests parallelism for synchronous Javascript (we automatically make your javascript asynchronous, you don’t have to manage it yourself with callbacks, you write it synchronously)
- cache, persistence and streams (in progress)
Any feedbacks or questions are welcomed.