class

Finfry::Web::Ctx

Inherits Reference < Object

A request/response pair with the few conveniences the handlers need: merged query+form params, the flash note carried across a redirect, and content negotiation for the JS callers.

Constructors

Instance methods

[](name : String) : String
Source
[]?(name : String) : String | Nil
Source
all(name : String) : Array(String)

Every value posted under name (multi-valued fields).

Source
asset(type : String, body : String) : Nil
Source
finish(error : Bool, message : String, back : String, extra = nil, undo : Int32 | Nil = nil) : Nil

Answer a completed write: JSON (with any extra fields) for fetch callers, otherwise redirect and carry the message as a note.

Source
flash
Source
html(body : String) : Nil
Source
json(data) : Nil
Source
method
Source
not_found
Source
params
Source
path
Source
raw_body
Source
redirect(to : String, notice : String | Nil = nil, error : String | Nil = nil, undo : Int32 | Nil = nil) : Nil
Source
referer
Source
wants_json?
Source

Nested types