iiif-prezi/osullivan

using Faraday >0.15.* causes errors

Closed this issue · 3 comments

After a recent update we ran into errors with Faraday 0.16.2:

RuntimeError: Adapter should be set using the `adapter` method, not `use`

The use method is called from IIIF::Presentation::ImageResource#get_info :

def get_info(svc_id)
  conn = Faraday.new("#{svc_id}/info.json") do |c|
    c.use Faraday::Response::RaiseError
    c.use Faraday::Adapter::NetHttp
  end
  resp = conn.get # raises exceptions that indicate HTTP problems
  JSON.parse(resp.body)
end

I think that I had errors for newer versions of other dependencies too.

I think this might be a dead project now, unfortunately. I haven't gotten any responses to issues for over a year now 👎

Also encountered this issue. Thanks for the tip about the Faraday version!

I'm no longer seeing this problem with Faraday 2.