Refactor HTTP::Client calls into make_client

This commit is contained in:
Omar Roth
2019-04-17 09:06:31 -05:00
parent ae7b5fac74
commit b6fff53b21
4 changed files with 19 additions and 12 deletions

View File

@@ -331,7 +331,7 @@ def generate_captcha(key, db)
end
def generate_text_captcha(key, db)
response = HTTP::Client.get(TEXTCAPTCHA_URL).body
response = make_client(TEXTCAPTCHA_URL).get("/omarroth@protonmail.com.json").body
response = JSON.parse(response)
tokens = response["a"].as_a.map do |answer|