class Protocol::HTTP::Request
def self.[](method, path = nil, _headers = nil, _body = nil, scheme: nil, authority: nil, headers: _headers, body: _body, protocol: nil, interim_response: nil)
@parameter headers [Hash] The headers, e.g. `{"accept" => "text/html"}`, etc.
@parameter path [String] The path, e.g. `"/index.html"`, `"/search?q=hello"`, etc.
@parameter method [String] The HTTP method, e.g. `"GET"`, `"POST"`, etc.
A short-cut method which exposes the main request variables that you'd typically care about.
def self.[](method, path = nil, _headers = nil, _body = nil, scheme: nil, authority: nil, headers: _headers, body: _body, protocol: nil, interim_response: nil) path = path&.to_s body = Body::Buffered.wrap(body) headers = Headers[headers] self.new(scheme, authority, method, path, nil, headers, body, protocol, interim_response) end