class Europeana::API::FaradayMiddleware::HandleText

Handles plain text & HTML responses from the API, which are never desired

Public Instance Methods

process_response(env) click to toggle source
Calls superclass method
# File lib/europeana/api/faraday_middleware/response/handle_text.rb, line 10
def process_response(env)
  super
  content_type = env.response_headers['Content-Type']
  fail Europeana::API::Errors::ResponseError.new(env),
       %(API responded with Content-Type "#{content_type}" and status #{env[:status]})
end