class Async::HTTP::Response
def self.[](status, headers = {}, body = [])
def self.[](status, headers = {}, body = []) body = Body::Buffered.wrap(body) self.new(nil, status, nil, headers, body) end
def self.for_exception(exception)
def self.for_exception(exception) Async::HTTP::Response[500, {'content-type' => 'text/plain'}, ["#{exception.class}: #{exception.message}"]] end
def continue?
def continue? status == 100 end
def failure?
def failure? status >= 400 && status < 600 end
def preserve_method?
def preserve_method? status == 307 || status == 308 end
def redirection?
def redirection? status >= 300 && status < 400 end
def success?
def success? status >= 200 && status < 300 end