Created
June 18, 2011 03:27
-
-
Save jhsu/1032771 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 'open-uri' | |
require 'openssl' | |
req = URI.parse("https://somedomain/file.zip") | |
res = req.read( | |
:ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE, | |
:http_basic_authentication => ["user", "pass"] | |
) | |
#=> OpenURI::HTTPError: 404 Not Found ... | |
# able to grab the file using curl | |
# curl -O -k --basic -u "user:pass" "https://somedomain/file.zip" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment