Module: Excon

Defined in:
lib/heroku/excon.rb

Class Method Summary collapse

Class Method Details

.get_with_redirect(url, options = {}) ⇒ Object


3
4
5
6
7
8
9
# File 'lib/heroku/excon.rb', line 3

def self.get_with_redirect(url, options={})
  res = Excon.get(url, options)
  if [301, 302].include?(res.status)
    return self.get_with_redirect(res.headers["Location"], options)
  end
  res
end