Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add optional parameter on yql::client to use common workaround for ss…

…l not verifying certificate
  • Loading branch information...
commit 8fc1ec2f9210b1f8791bf0eab46e5d9b36d96344 1 parent 783ef6a
@EvilScott EvilScott authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.