Created
June 10, 2014 20:41
-
-
Save rbishop/e2a8045742f0b4ccebad to your computer and use it in GitHub Desktop.
rainforest
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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