Skip to content

Commit

Permalink
add optional parameter on yql::client to use common workaround for ss…
Browse files Browse the repository at this point in the history
…l not verifying certificate
  • Loading branch information
EvilScott committed Sep 7, 2011
1 parent 783ef6a commit 8fc1ec2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/yql/client.rb
Expand Up @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 8fc1ec2

Please sign in to comment.