Skip to content

Instantly share code, notes, and snippets.

@rbishop
Created June 10, 2014 20:41
Show Gist options
  • Select an option

  • Save rbishop/e2a8045742f0b4ccebad to your computer and use it in GitHub Desktop.

Select an option

Save rbishop/e2a8045742f0b4ccebad to your computer and use it in GitHub Desktop.
rainforest
require 'httparty'
fetch = -> (url) {
HTTParty.get(url, headers: { "Accept" => "application/json"})
}
response = fetch.("http://letsrevolutionizetesting.com/challenge.json")
begin
next_url = response["follow"]
response = fetch.(next_url)
puts response
end while response["follow"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment