Use Faraday as HTTP Engine?

33 views
Skip to first unread message

Jimmy Zimmerman

unread,
Jan 10, 2013, 3:08:55 PM1/10/13
to ruby-f...@googlegroups.com
I've done some more evaluation of Ruby HTTP libraries, and I think I'm going to build this new gem on the "faraday" gem. It looks quite robust. It is tested on all major Ruby versions (MRI (1.8 and 1.9.x), JRuby, Rubinius), and supports several underlying HTTP engines (Net/HTTP, Typhoeus, Event-Machine) so I think some cool things could be done on that front.

Faraday also supports a Rack-style middleware stack. I think it would be way cool to be able to configure the library with a cache engine (such as memcached). There is a middleware that honors HTTP caching headers and request caching would basically come for free (like you get when working in the browser). 

I would also want to use the logger middleware and the json parser middleware. That way, all serialization/deserialization would be handled at that level, which would be great.

Any objections? Does anyone have experience using the faraday gem?

--
Jimmy

Dean Richardson

unread,
Jan 11, 2013, 4:46:11 PM1/11/13
to ruby-f...@googlegroups.com
Jimmy:

I'm afraid I have zero experience with the Faraday gem. I'm interested in learning more about it, though. Is https://github.com/lostisland/faraday#readme the best place to start?

Thanks,

Dean

Jimmy Zimmerman

unread,
Jan 11, 2013, 4:49:13 PM1/11/13
to ruby-f...@googlegroups.com
Yes. That is a good place to start. Hopefully, consumers of the new gem won't need to know all of the internals, but for those collaborating on the gem, this would be a good thing to check out. 

--
Jimmy



NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.


Reply all
Reply to author
Forward
0 new messages