coldbox-request-context
OfficialControl ColdBox request flow and flash scope
AuthorColdBox
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Centralizes access to request data and response control in ColdBox by providing clear patterns for reading and writing public and private request collections, inspecting HTTP metadata, handling AJAX and REST payloads, and managing flash-scoped data across redirects.
Core Features & Use Cases
- Request collection management: Read and write rc (public) and prc (private) collections, use event.getValue and event.getPrivateValue for defaults and existence checks.
- HTTP introspection and body parsing: Detect HTTP methods, check isAjax/isSSL, read headers and raw or JSON bodies for REST handlers.
- Response control and navigation: Render views with or without layouts, render JSON responses, set headers and status codes, suppress rendering, and relocate/redirect including named and external routes.
- URL generation and flash patterns: Build links reliably with buildLink, persist ephemeral data across redirects with flash (including persistence and clearing), and implement PRG and AJAX-response patterns.
- Use Case: Implement a listing that returns JSON for AJAX requests and full HTML for normal requests while safely populating prc for views and preserving form errors in flash across a redirect.
Quick Start
In a handler, use event.getValue to read parameters, set prc.user from your userService, use flash.put to store one-request messages if needed, and call event.setView to render the target template.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: coldbox-request-context Download link: https://github.com/ColdBox/skills/archive/main.zip#coldbox-request-context Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.