jetc: add demo4-7.jet as worked #api examples (Stage 4 verification)
Used to live-verify APIServer end to end - one small template per
distinct code path, matching demo.jet/demo2.jet's existing role as
worked examples rather than throwaway scratch files:
- demo4.jet: "#api GET /users/{id}" + $[id] - path param capture.
- demo5.jet: "#api POST /echo" + $[:message] - urlencoded form body via
CGIFormData, reached through the same $[:name] CGI convention the
interpreter already uses.
- demo6.jet: "#api GET /crash" + $[:message] with no body present -
deliberately throws (Tag::getVariable's cgiData-is-null error),
verifying a render-time exception turns into a clean response instead
of taking the server down.
- demo7.jet: "#api GET /search" + $[q] - query string parsing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
634eb7a9a9
commit
3f273b0a95
4 files changed
+12
No files matched your search
@@ -0,0 +1,3 @@
|
||||
#!../jet-2.0
|
||||
#api GET /crash
|
||||
Value: $[:message]
|
||||
Reference in new issue
Block a user