class Async::HTTP::Request
def self.[](method, path, headers, body)
def self.[](method, path, headers, body) body = Body::Buffered.wrap(body) self.new(nil, nil, method, path, nil, headers, body) end
def connect?
def connect? self.method == CONNECT end
def head?
def head? self.method == HEAD end
def idempotent?
def idempotent? method != POST && (body.nil? || body.empty?) end
def initialize(scheme = nil, authority = nil, method = nil, path = nil, version = nil, headers = [], body = nil)
def initialize(scheme = nil, authority = nil, method = nil, path = nil, version = nil, headers = [], body = nil) @scheme = scheme @authority = authority @method = method @path = path @version = version @headers = headers @body = body end
def inspect
def inspect "\#<#{self.class} #{self.to_s} scheme=#{@scheme.inspect} authority=#{@authority.inspect} headers=#{@headers.to_h.inspect} body=#{@body.inspect}>" end
def to_s
def to_s "#{@method} #{@path} #{@version}" end