summaryrefslogtreecommitdiff
path: root/test/programs/router.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/programs/router.ts')
-rw-r--r--test/programs/router.ts75
1 files changed, 75 insertions, 0 deletions
diff --git a/test/programs/router.ts b/test/programs/router.ts
new file mode 100644
index 0000000..2d2dcb5
--- /dev/null
+++ b/test/programs/router.ts
@@ -0,0 +1,75 @@
+export const HTTP_BRAINSTORM_PROG = `
+WE MADE Cookie WITH
+RUMOR HAS IT
+ String key,
+ String value,
+ Maybe(String) expires,
+ Maybe(Boolean) secure,
+ Maybe(Boolean) httpOnly,
+ Maybe(String) sameSite,
+END OF STORY
+
+ONLY OPTIONS OF HttpMethod ARE
+RUMOR HAS IT
+ Get,
+ Post,
+ Delete,
+ Patch,
+ Put,
+END OF STORY
+
+WE MADE Request WITH
+RUMOR HAS IT
+ HttpMethod method,
+ String path,
+ Maybe(List(Cookie)) cookies,
+ List(String[2]) headers,
+ List(String[2]) query,
+END OF STORY
+
+WE MADE Response WITH
+RUMOR HAS IT
+ String response,
+ Maybe(List(String[2])) headers,
+ Maybe(List(String[2])) cookies,
+END OF STORY
+
+STUFF OF Controller LOOKS LIKE
+RUMOR HAS IT
+ DISCOVER HOW TO respond
+ WITH Request req
+ GIVES YOU Response
+END OF STORY
+
+EVERYTHING CHANGED WHEN BasicController
+ WHICH LOOKS LIKE Controller
+ EXISTS
+RUMOR HAS IT
+ PRACTICALLY IMPOSSIBLE TO HAVE BasicController
+ WITHOUT
+ Maybe(Int) initialCount
+ RUMOR HAS IT
+ EXPERTS CLAIM count TO BE Int
+ IS DATING initialCount WHO IS
+ RUMOR HAS IT
+ Someone(c) SO c
+ Nobody SO 0
+ END OF STORY
+ END OF STORY
+
+ DISCOVER HOW TO respond
+ WITH Request req
+ GIVES YOU Response
+ RUMOR HAS IT
+ EXPERTS CLAIM res TO BE Response MADE OF
+ RUMOR HAS IT
+ EXPERTS CLAIM response TO BE Int.toString OF
+ MY OWN count
+ END OF STORY
+
+ SHOCKING DEVELOPMENT res
+ END OF STORY
+END OF STORY
+
+PLEASE LIKE AND SUBSCRIBE
+`;