Files
Brad ArantandClaude Sonnet 5 3f273b0a95 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>
2026-08-25 11:29:12 -07:00

4 lines
51 B
Plaintext

#!../jet-2.0
#api POST /echo
You said: $[:message]