FIX: discourse hub calls

This commit is contained in:
Neil Lalonde 2017-06-20 17:15:59 -04:00
parent 492eed70ab
commit 1b3501b39b

View File

@ -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