Using the Net::HTTP adapter is fine, itβs just binding your code to a specific interface, which may differ from alternative tools. The main reason for using Faraday is that it wraps multiple adapters, one of which is Net::HTTP . If you use Faraday and start with Net:HTTP , you can use Excon , Typhoeus , Patron or EventMachine without changing more than a line or two configurations. If you used Net::HTTP directly, you would have to change a lot of implementation-specific code to switch to another adapter.
Chris cashwell
source share