Options.new(:method, :body, :url, :request, :request_headers, :ssl, :parallel_manager, :params, :response, :response_headers, :status)
A Set of HTTP verbs that typically send a body. If no body is set for these requests, the Content-Length header is set to 0.
Public
# File lib/faraday/options.rb, line 273 def [](key) if in_member_set?(key) super(key) else custom_members[key] end end
Public
# File lib/faraday/options.rb, line 282 def []=(key, value) if in_member_set?(key) super(key, value) else custom_members[key] = value end end
Public
# File lib/faraday/options.rb, line 301 def clear_body request_headers[ContentLength] = '0' self.body = '' end
Internal
# File lib/faraday/options.rb, line 330 def custom_members @custom_members ||= {} end
# File lib/faraday/options.rb, line 336 def in_member_set?(key) self.class.member_set.include?(key.to_sym) end
# File lib/faraday/options.rb, line 316 def inspect attrs = [nil] members.each do |mem| if value = send(mem) attrs << "@#{mem}=#{value.inspect}" end end if !custom_members.empty? attrs << "@custom=#{custom_members.inspect}" end %(#<#{self.class}#{attrs.join(" ")}>) end
Public
# File lib/faraday/options.rb, line 296 def needs_body? !body && MethodsWithBodies.include?(method) end
Public
# File lib/faraday/options.rb, line 312 def parallel? !!parallel_manager end
Generated with the Darkfish Rdoc Generator 2.