Finfry::Web::Ctx
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
new(ctx : HTTP::Server::Context)
SourceInstance methods
Answer a completed write: JSON (with any extra fields) for fetch callers, otherwise redirect and carry the message as a note.
flash
Sourcejson(data) : Nil
Sourcemethod
Sourcenot_found
Sourceparams
Sourcepath
Sourceraw_body
Sourceredirect(to : String, notice : String | Nil = nil, error : String | Nil = nil, undo : Int32 | Nil = nil) : Nil
Sourcereferer
Sourcewants_json?
Source