# File lib/faraday/adapter.rb, line 43 def call(env) if !env[:body] and Connection::METHODS_WITH_BODIES.include? env[:method] # play nice and indicate we're sending an empty body env[:request_headers][CONTENT_LENGTH] = "0" # Typhoeus hangs on PUT requests if body is nil env[:body] = '' end end
# File lib/faraday/adapter/patron.rb, line 62 def prepend_proxy_auth_string(proxy, session) session.proxy.insert(7, "#{proxy[:user]}:#{proxy[:password]}@") end
# File lib/faraday/adapter.rb, line 52 def save_response(env, status, body, headers = nil) env[:status] = status env[:body] = body env[:response_headers] = Utils::Headers.new.tap do |response_headers| response_headers.update headers unless headers.nil? yield response_headers if block_given? end end
Generated with the Darkfish Rdoc Generator 2.