The transaction that is currently being processed, usually a Mojo::Transaction::HTTP or Mojo::Transaction::WebSocket object. Note that this reference is usually weakened, so the object needs to be referenced elsewhere as well when you're performing non-blocking operations and the underlying connection might get closed early.

Access route placeholder values that are not reserved stash values, file uploads as well as GET and POST parameters extracted from the query string and application/x-www-form-urlencoded or multipart/form-data message body, in that order. If there are multiple values sharing the same name, and you want to access more than just the last one, you can use "every_param". Parts of the request body need to be loaded into memory to parse POST parameters, so you have to make sure it is not excessively large, there's a 16MB limit by default.

Try to render content and return it wrapped in a Mojo::ByteStream object or return undef, all arguments get localized automatically and are only available during this render operation, takes the same arguments as "render".

Automatically select best possible representation for resource from Accept request header, format stash value or formatGET/POST parameter, defaults to "default_format" in Mojolicious::Renderer or rendering an empty 204 response. Each representation can be handled with a callback or a hash reference containing arguments to be passed to "render". Since browsers often don't really know what they actually want, unspecific Accept request headers with more than one MIME type will be ignored, unless the X-Requested-With header is set to the value XMLHttpRequest.

Send message or frame non-blocking via WebSocket, the optional drain callback will be executed once all data has been written. This method will automatically respond to WebSocket handshake requests with a 101 response status, to establish the WebSocket connection.

Persistent data storage for the next few requests, all session data gets serialized with Mojo::JSON and stored Base64 encoded in HMAC-SHA1 signed cookies, to prevent tampering. Note that cookies usually have a 4096 byte (4KB) limit, depending on browser.

Access signed request cookie values and create new signed response cookies. If there are multiple values sharing the same name, and you want to access more than just the last one, you can use "every_signed_cookie". Cookies are cryptographically signed with HMAC-SHA1, to prevent tampering, and the ones failing signature verification will be automatically discarded.

Non-persistent data storage and exchange for the current request, application wide default values can be set with "defaults" in Mojolicious. Some stash values have a special meaning and are reserved, the full list is currently action, app, cb, controller, data, extends, format, handler, inline, json, layout, namespace, path, status, template, text and variant. Note that all stash values with a mojo.* prefix are reserved for internal use.

Generate a portable Mojo::URL object with base for a path, URL or route.

# "http://127.0.0.1:3000/index.html" if application was started with Morbo
$c->url_for('/index.html')->to_abs;
# "https://127.0.0.1:443/index.html" if application was started with Morbo
$c->url_for('/index.html')->to_abs->scheme('https')->port(443);
# "/index.html?foo=bar" if application is deployed under "/"
$c->url_for('/index.html')->query(foo => 'bar');
# "/myapp/index.html?foo=bar" if application is deployed under "/myapp"
$c->url_for('/index.html')->query(foo => 'bar');

Get Mojolicious::Validator::Validation object for current request to validate file uploads as well as GET and POST parameters extracted from the query string and application/x-www-form-urlencoded or multipart/form-data message body. Parts of the request body need to be loaded into memory to parse POST parameters, so you have to make sure it is not excessively large, there's a 16MB limit by default.

Write dynamic content non-blocking, the optional drain callback will be executed once all data has been written. Calling this method without a chunk of data will finalize the response headers and allow for dynamic content to be written later.

Write dynamic content non-blocking with chunked transfer encoding, the optional drain callback will be executed once all data has been written. Calling this method without a chunk of data will finalize the response headers and allow for dynamic content to be written later.