Class: Weneedfeed::FaradayResponseMiddleware

Inherits:
FaradayMiddleware::ResponseMiddleware
  • Object
show all
Defined in:
lib/weneedfeed/faraday_response_middleware.rb

Instance Method Summary collapse

Instance Method Details

#parse_response?(env) ⇒ Boolean

Note:

Overriding.

Returns:

  • (Boolean)


23
24
25
# File 'lib/weneedfeed/faraday_response_middleware.rb', line 23

def parse_response?(env)
  env.response.headers['Content-Type'].to_s.include?('application/json')
end