-
-
Save anonymous/c7c87e32123e749caaa1 to your computer and use it in GitHub Desktop.
This file contains 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 'net/http' | |
#send get request to Heroku app | |
http = Net::HTTP.new("http://xxxxx.herokuapp.com/") | |
request = Net::HTTP::Get.new("/available.json") | |
response = http.request(request) | |
# error | |
# getaddrinfo: nodename nor servname provided, or not known (SocketError) | |
# curl works fine | |
# curl http://xxxxx.herokuapp.com/available.json | |
# {"available":["user1","user2"]} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment