lib/saorin/adapters/clients/faraday.rb in saorin-0.1.1 vs lib/saorin/adapters/clients/faraday.rb in saorin-0.1.2

- old
+ new

@@ -10,15 +10,19 @@ def initialize(options = {}, &block) super options @connection = ::Faraday::Connection.new(options) do |builder| builder.adapter ::Faraday.default_adapter + builder.response :raise_error block.call builder if block end end def send_request(content) - response = @connection.post '', content + response = @connection.post do |req| + req.headers[:content_type] = CONTENT_TYPE + req.body = content + end response.body end end register :faraday, Faraday