mirror of
https://github.com/lostisland/faraday.git
synced 2025-10-06 00:03:36 -04:00
fix weird logging bug
This commit is contained in:
parent
dddc8697e0
commit
73f7473d32
@ -13,13 +13,13 @@ module Faraday
|
||||
super
|
||||
@logger.info "#{env[:method]} #{env[:url].to_s}"
|
||||
@logger.debug("request") do
|
||||
env[:request_headers].map { |(k, v)| "#{k}: #{v.inspect}" }.join("\n")
|
||||
env[:request_headers].map { |k, v| "#{k}: #{v.inspect}" }.join("\n")
|
||||
end
|
||||
|
||||
env[:response].on_complete do |resp_env|
|
||||
@logger.info("Status") { env[:status].to_s }
|
||||
@logger.debug("response") do
|
||||
resp_env[:response_headers].map { |(k, v)| "#{k}: #{v.inspect}" }.join("\n")
|
||||
resp_env[:response_headers].map { |k, v| "#{k}: #{v.inspect}" }.join("\n")
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -72,7 +72,7 @@ module Faraday
|
||||
{ :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),
|
||||
|
Loading…
x
Reference in New Issue
Block a user