Faraday is the ruby HTTP client library of choice. Why is it preferable to use it over HTTParty?
Some things that I would like compared are:
They differ in many aspects, but here's the essence IMHO:
HTTParty: - Uses net/http - Some magic (e.g. parse JSON responses)
Faraday: - A wrapper around most of the http libraries out there (excon, typhoeus, net-http-persistent, etc.) - Allows to craft the request and response middleware that suits your specific needs.
I personally prefer Faraday, as it allows me to switch to any http library, and because it allows very fine-grain control over the request and response.
I was at the point of having to make the same decision yesterday. However, I just need a library that can do simple http requests, nothing fancy... I was however looking for something that is easier to use than Net::HTTP.
For my purposes, both libraries seemed equally well suited, so I decided to go with the one introducing less overhead. Since I also use the twitter gem in this project, I went with faraday since the twitter gem already depends on it and I get it included in my project for "free"...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With