Armature::Route::Response
Inherits IO / Reference / Object
Constructors
new(context : HTTP::Server::Context)
Sourcenew(response : HTTP::Server::Response)
SourceInstance methods
headers(*args, **options)
Sourceheaders(*args, **options, &)
Sourcejson(serializer)
Sourcejson
Sourceoutput
Sourceread(*args, **options)
Sourceread(*args, **options, &)
Sourceredirect(path : String | URI, status : HTTP::Status = :see_other)
Sourcestatus(*args, **options)
Sourcestatus(*args, **options, &)
Sourcestatus=(status : HTTP::Status)
Sourcewrite(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"