Browse files

Merge pull request #1 from EvilScott/master

Add optional param to bypass SSL verification
  • Loading branch information...
2 parents 783ef6a + 8fc1ec2 commit 673c1fe71b82966fdcc9e3bff5d37a8e18b92a18 Nasir Jamal committed Oct 14, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/yql/client.rb
View
2 lib/yql/client.rb
@@ -15,6 +15,7 @@ def initialize(args={})
@version = args[:version] || VERSION
@format = args[:format] || 'xml'
@query = args[:query]
+ @verify_ssl = args[:verify_ssl] || true
raise_when_invalid_format(format)
end
@@ -37,6 +38,7 @@ def get
end
http = Net::HTTP.new(BASE_URL, Net::HTTP.https_default_port)
http.use_ssl = true
+ http.verify_mode = OpenSSL::SSL::VERIFY_NONE unless @verify_ssl
Yql::Response.new(http.post(path_without_domain, parameters), format)
end

0 comments on commit 673c1fe

Please sign in to comment.