lib/fanforce/api/_main.rb in fanforce-api-0.14.5 vs lib/fanforce/api/_main.rb in fanforce-api-0.14.6
- old
+ new
@@ -41,18 +41,18 @@
end
def post(path, req_params={})
url = complete_url(path)
req_params = apply_auth(req_params)
- RestClient.post(url, req_params.to_json, :content_type => :json, :accept => :json) do |response, request, result, &block|
+ RestClient.post(url, MultiJson.dump(req_params), :content_type => :json, :accept => :json) do |response, request, result, &block|
Fanforce::API::Response.process(response, request, url, req_params)
end
end
def put(path, req_params={})
url = complete_url(path)
req_params = apply_auth(req_params)
- RestClient.put(url, req_params.to_json, :content_type => :json, :accept => :json) do |response, request, result, &block|
+ RestClient.put(url, MultiJson.dump(req_params), :content_type => :json, :accept => :json) do |response, request, result, &block|
Fanforce::API::Response.process(response, request, url, req_params)
end
end
def delete(path, req_params={})