From 1b3501b39b8034440b92c46546c64ca95a75f03d Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Tue, 20 Jun 2017 17:15:59 -0400 Subject: [PATCH] FIX: discourse hub calls --- lib/discourse_hub.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/discourse_hub.rb b/lib/discourse_hub.rb index 40aabdedda9..174ca23fb8a 100644 --- a/lib/discourse_hub.rb +++ b/lib/discourse_hub.rb @@ -51,8 +51,8 @@ module DiscourseHub def self.collection_action(action, rel_url, params={}) JSON.parse(Excon.send(action, "#{hub_base_url}#{rel_url}", - body: URI.encode_www_form(params), - headers: { 'Referer' => referer, 'Accept' => accepts.join(', '), "Content-Type" => "application/x-www-form-urlencoded" }, + body: JSON[params], + headers: { 'Referer' => referer, 'Accept' => accepts.join(', '), "Content-Type" => "application/json" }, omit_default_port: true ).body) end