lib/airborne/base.rb in airborne-0.0.14 vs lib/airborne/base.rb in airborne-0.0.15

- old
+ new

@@ -51,15 +51,15 @@ end private def make_request(method, url, options = {}) - headers = options[:headers] || {} + headers = (options[:headers] || {}).merge({content_type: :json}) base_headers = Airborne.configuration.headers || {} headers = base_headers.merge(headers) res = if method == :post || method == :patch || method == :put begin - RestClient.send(method, get_url(url), options[:body].nil? ? "" : options[:body], headers) + RestClient.send(method, get_url(url), options[:body].nil? ? "" : options[:body].to_json, headers) rescue RestClient::Exception => e e.response end else begin