mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 14:52:46 +08:00
FIX: version check
api.discourse.org server apparently does not like GET requests that have a port number in the headers Host entry Additionally fix the actual GET query; it should use query parameters not a body.
This commit is contained in:
parent
c5f42f0e97
commit
170a554747
|
@ -42,8 +42,9 @@ module DiscourseHub
|
||||||
def self.singular_action(action, rel_url, params={})
|
def self.singular_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.to_query,
|
headers: { 'Referer' => referer, 'Accept' => accepts.join(', ') },
|
||||||
headers: { 'Referer' => referer, 'Accept' => accepts.join(', ') }
|
:query => params,
|
||||||
|
:omit_default_port => true
|
||||||
).body)
|
).body)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user