class Armature::Route::Response

Defined in:

route.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(response : HTTP::Server::Response) #

[View source]

Instance Method Detail

def headers(*args, **options) #

[View source]
def headers(*args, **options, &) #

[View source]
def json(serializer) #

[View source]
def json(**stuff) #

[View source]
def output #

[View source]
def read(*args, **options) #

[View source]
def read(*args, **options, &) #

[View source]
def redirect(path, status : HTTP::Status = :see_other) #

[View source]
def status(*args, **options) #

[View source]
def status(*args, **options, &) #

[View source]
def status=(status : HTTP::Status) #

[View source]
def write(slice : Bytes) : Nil #
Description copied from class IO

Writes the contents of slice into this IO.

io = IO::Memory.new
slice = Bytes.new(4) { |i| ('a'.ord + i).to_u8 }
io.write(slice)
io.to_s # => "abcd"

[View source]