lib/faraday/request.rb in faraday-0.5.6 vs lib/faraday/request.rb in faraday-0.5.7
- old
+ new
@@ -1,12 +1,13 @@
module Faraday
# Used to setup urls, params, headers, and the request body in a sane manner.
#
# @connection.post do |req|
# req.url 'http://localhost', 'a' => '1' # 'http://localhost?a=1'
- # req.headers['b'] = '2' # header
- # req['b'] = '2' # header
+ # req.headers['b'] = '2' # Header
+ # req.params['c'] = '3' # GET Param
+ # req['b'] = '2' # also Header
# req.body = 'abc'
# end
#
class Request < Struct.new(:path, :params, :headers, :body)
extend AutoloadHelper
@@ -69,10 +70,10 @@
connection.merge_params(env_params, params)
{ :method => request_method,
:body => body,
:url => connection.build_url(path, env_params),
- :request_headers => env_headers.update(headers),
+ :request_headers => env_headers,
:parallel_manager => connection.parallel_manager,
:response => Response.new,
:request => connection.options.merge(:proxy => connection.proxy),
:ssl => connection.ssl}
end