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 to_s
def to_s "#{@scheme}://#{@authority}: #{@method} #{@path} #{@version}" end