mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:43:16 +08:00
FIX: discourse hub calls
This commit is contained in:
parent
492eed70ab
commit
1b3501b39b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user