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