Created
September 11, 2015 22:03
-
-
Save remiq/318db8ebc8ac7c186f29 to your computer and use it in GitHub Desktop.
Sending http get request, till it works.
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
defp get!(url) do | |
case HTTPoison.get(url) do | |
{:ok, resp} -> resp | |
resp -> | |
IO.inspect {url, resp} | |
:timer.sleep 5_000 | |
get!(url) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment