class Armature::Route::Response
- Armature::Route::Response
- IO
- Reference
- Object
Defined in:
route.crConstructors
Instance Method Summary
- #headers(*args, **options)
- #headers(*args, **options, &)
- #json(serializer)
- #json(**stuff)
- #output
- #read(*args, **options)
- #read(*args, **options, &)
- #redirect(path, status : HTTP::Status = :see_other)
- #status(*args, **options)
- #status(*args, **options, &)
- #status=(status : HTTP::Status)
-
#write(slice : Bytes) : Nil
Writes the contents of slice into this
IO
.
Constructor Detail
Instance Method Detail
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"