FIX: Incorrect way to use Excon in `DiscourseHub`.
This commit is contained in:
parent
394efb3290
commit
8dbe2c3ec4
|
@ -51,8 +51,9 @@ module DiscourseHub
|
||||||
def self.collection_action(action, rel_url, params={})
|
def self.collection_action(action, rel_url, params={})
|
||||||
JSON.parse(Excon.send(action,
|
JSON.parse(Excon.send(action,
|
||||||
"#{hub_base_url}#{rel_url}",
|
"#{hub_base_url}#{rel_url}",
|
||||||
body: params,
|
body: URI.encode_www_form(params),
|
||||||
headers: { 'Referer' => referer, 'Accept' => accepts.join(', '), 'Content-Type' => 'application/json' }
|
headers: { 'Referer' => referer, 'Accept' => accepts.join(', '), "Content-Type" => "application/x-www-form-urlencoded" },
|
||||||
|
omit_default_port: true
|
||||||
).body)
|
).body)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue