From 6f15d83b8724508a67151289e0a49e94399dc5ab Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 13 Mar 2019 15:11:24 +0800 Subject: [PATCH] Merge branch 'develop' of http://bdgit.educoder.net/Hjqreturn/pgfqe6ch8 into develop # Conflicts: # app/controllers/ecloud_controller.rb --- app/controllers/ecloud_controller.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index 096275bb..e1eaced2 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -157,6 +157,10 @@ class EcloudController < ApplicationController def get(url) uri = URI(url) res = Net::HTTP.start(uri.host, uri.port, use_ssl: url.start_with?('https')) do |http| + + ## TODO + http.verify_mode = OpenSSL::SSL::VERIFY_NONE + req = Net::HTTP::Get.new(uri) #req['Content-Type'] = 'application/json' # The body needs to be a JSON string, use whatever you know to parse Hash to JSON @@ -170,6 +174,8 @@ class EcloudController < ApplicationController def post(url) uri = URI(url) res = Net::HTTP.start(uri.host, uri.port, use_ssl: url.start_with?('https')) do |http| + ## TODO + http.verify_mode = OpenSSL::SSL::VERIFY_NONE req = Net::HTTP::Post.new(uri) #req['Content-Type'] = 'application/json' # The body needs to be a JSON string, use whatever you know to parse Hash to JSON