mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FIX: Incorrect way to use Excon in DiscourseHub
.
This commit is contained in:
@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user