Fix XMPP API POST request
Faraday does not turn hashes into JSON by itself apparently.
This commit is contained in:
@@ -4,7 +4,7 @@ class EjabberdApiClient
|
||||
end
|
||||
|
||||
def post(endpoint, payload)
|
||||
res = Faraday.post("#{@base_url}/#{endpoint}", payload,
|
||||
res = Faraday.post("#{@base_url}/#{endpoint}", payload.to_json,
|
||||
"Content-Type" => "application/json")
|
||||
|
||||
if res.status != 200
|
||||
|
||||
Reference in New Issue
Block a user