Method: Html2rss::RequestService::FaradayStrategy#execute

Defined in:
lib/html2rss/request_service/faraday_strategy.rb

#executeObject

return [Response]


13
14
15
16
17
18
19
20
21
# File 'lib/html2rss/request_service/faraday_strategy.rb', line 13

def execute
  request = Faraday.new(url: ctx.url, headers: ctx.headers) do |faraday|
    faraday.use Faraday::FollowRedirects::Middleware
    faraday.adapter Faraday.default_adapter
  end
  response = request.get

  Response.new(body: response.body, headers: response.headers)
end