summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Okay <okay@toyful.space>2022-03-26 16:08:02 -0500
committerColin Okay <okay@toyful.space>2022-03-26 16:08:02 -0500
commit3f53200ad8fb9bb68cd4f971867289595b05fb11 (patch)
tree67a2a55ec39c7d997ca2750cccafb20327a811bb
parentd248e03474c97d83cd788b38a17fd98ea54464d9 (diff)
[bugfix] host missing from uri
-rw-r--r--lazybones-client.lisp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lazybones-client.lisp b/lazybones-client.lisp
index ccc6ccf..9f10041 100644
--- a/lazybones-client.lisp
+++ b/lazybones-client.lisp
@@ -101,6 +101,7 @@ for making requests to endpoint EP."
"?"
(endpoint-defun-dexador-uri-route-query-format-string ep)
"\" "
+ "%host "
(str:join " " (endpoint-defun-route-var-names ep))
" "
(str:join " " (endpoint-defun-query-var-names ep))
@@ -111,7 +112,7 @@ for making requests to endpoint EP."
for making requests to the endpoint EP in the app APP."
(format
nil
- "(dexador:~a~% ~a~%~{ ~a~%~})"
+ " (dexador:~a~% ~a~%~{ ~a~^~%~})"
(string-downcase (symbol-name (lazybones::endpoint-method ep)))
(endpoint-defun-dexador-request-uri app ep)
(append
@@ -119,13 +120,13 @@ for making requests to endpoint EP."
(list ":content %body"))
(list
":cookie-jar %cookies"
- ":headers (append (when %content-type (list (cons \"Content-Type\" %content-type))) %headers)"))))
+ ":headers (cons (cons \"Content-Type\" %content-type) %headers)"))))
(defun generate-defun-for-endpoint (app ep)
"Returns a string representation of a defun form for a function that
makes a request to the endpoint EP."
(format nil
- "(defun ~a ~a~%~s~%~a)"
+ "(defun ~a ~a~% ~s~%~a)"
(endpoint-defun-name ep)
(endpoint-defun-lambda-list ep)
(lazybones::endpoint-documentation ep)
@@ -159,7 +160,7 @@ makes a request to the endpoint EP."
"
(defpackage #:~a
(:use :cl :lazybones-client.shared)
- (:export ~%~{ #:~a~%~}))"
+ (:export ~%~{ #:~a~^~%~}))"
(app-client-package-name app)
(all-function-names app))
(terpri out)