class

Armature::Route::Response

Inherits IO / Reference / Object

Constructors

new(context : HTTP::Server::Context)
Source
new(response : HTTP::Server::Response)
Source

Instance methods

headers(*args, **options)
Source
headers(*args, **options, &)
Source
json(serializer)
Source
json
Source
output
Source
read(*args, **options)
Source
read(*args, **options, &)
Source
redirect(path : String | URI, status : HTTP::Status = :see_other)
Source
status(*args, **options)
Source
status(*args, **options, &)
Source
status=(status : HTTP::Status)
Source
write(slice : Bytes) : Nil

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"
Source