lib/board/client/request.rb in board-client-0.99.0 vs lib/board/client/request.rb in board-client-0.99.1
- old
+ new
@@ -20,10 +20,11 @@
http = Net::HTTP.new(uri.host, uri.port)
if uri.port == 443 # ssl?
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
+ http.ca_path = @ssl[:ca_path] if @ssl[:ca_path]
end
case method
when :get
request = Net::HTTP::Get.new(uri.request_uri)
@@ -34,10 +35,10 @@
request.set_form_data(params)
response = http.request(request)
case response.code
when /2../
- if response.body.empty?
+ if response.body.blank?
true
else
Yajl::Parser.parse(response.body)
end
when '400'