aboutsummaryrefslogtreecommitdiff
path: root/src/client/ps/generate.lisp
diff options
context:
space:
mode:
authorcolin <colin@cicadas.surf>2024-06-23 14:43:20 -0700
committercolin <colin@cicadas.surf>2024-06-23 14:43:20 -0700
commit30a034b30b66694447fc38172a2265a1095af222 (patch)
treed25eedc14ad0e313cc156eb71e2be9a34f971c44 /src/client/ps/generate.lisp
parentc4dd08d03d4440744a4061141f8cec54f1360a29 (diff)
Add: client generator for dexador
Diffstat (limited to 'src/client/ps/generate.lisp')
-rw-r--r--src/client/ps/generate.lisp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/ps/generate.lisp b/src/client/ps/generate.lisp
index 11b0c53..f6f317b 100644
--- a/src/client/ps/generate.lisp
+++ b/src/client/ps/generate.lisp
@@ -4,13 +4,13 @@
(:local-nicknames
(#:wknd #:weekend)
(#:a #:alexandria-2))
- (:export #:parenscript))
+ (:export #:generate))
(in-package #:weekend.client.ps)
;; this function largely mirrors the implementation of construct-route-builder
-(defun generate-endpoint-client (class)
+(defun generate (class)
(when (symbolp class) (setf class (find-class class)))
(let*
@@ -26,6 +26,7 @@
:collect (intern (string part))))
(method
(wknd:request-method class))
+
(body
(when (wknd:body-expected-p method)
`(ps:chain -J-S-O-N
@@ -51,6 +52,6 @@
method ,(string method)
cache "no-cache"
headers (ps:create "Content-Type" "application/json")
- redirect follow
+ redirect "follow"
,@(when body (list 'body body)))))))