Created
April 7, 2010 20:49
-
-
Save biot023/359437 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
uri = URI.parse( "https://myapp.heroku.com" ) | |
http = Net::HTTP.new( uri.port, uri.host ) | |
http.use_ssl = true | |
request = Net::HTTP::Post.new( "/mobile_app/timesheet_uploads.json" ) | |
request["content-type"] = "application/json" | |
request.body = JSON.generate( { upload_data: upload_data } ) | |
request.basic_auth( MyConfig::USERNAME, MyConfig::PASSWORD ) | |
response = http.request( request ) | |
# last line creates this error: "getaddrinfo: nodename nor servname provided, or not known" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment