From 7e35e1af0d6755eecb92fc77833b5b36b9d4defd Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Wed, 13 Mar 2019 15:35:19 +0800 Subject: [PATCH] json --- app/controllers/ecloud_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/ecloud_controller.rb b/app/controllers/ecloud_controller.rb index 4da750ce..1039bede 100644 --- a/app/controllers/ecloud_controller.rb +++ b/app/controllers/ecloud_controller.rb @@ -178,6 +178,8 @@ class EcloudController < ApplicationController http.use_ssl = url.start_with?('https') http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(uri.request_uri) + request['Content-Type'] = 'application/json' + request['Accept'] = 'application/json' response = http.request(request) response.body