diff options
author | Colin Okay <okay@toyful.space> | 2022-02-14 11:19:02 -0600 |
---|---|---|
committer | Colin Okay <okay@toyful.space> | 2022-02-14 11:19:02 -0600 |
commit | 42253bda23237c918edf73b790d98aad16a44b3c (patch) | |
tree | 12dd8dc4706af7a19c0c1e8f340e81e51a0b0332 | |
parent | fcb4feb0bed7cd27e6910062cbaa5103ee4c8d3f (diff) |
dumb hack - sharing an internal symbol
-rw-r--r-- | lazybones-client.asd | 2 | ||||
-rw-r--r-- | lazybones-client.lisp | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/lazybones-client.asd b/lazybones-client.asd index 8be141e..0c14785 100644 --- a/lazybones-client.asd +++ b/lazybones-client.asd @@ -2,7 +2,7 @@ :description "Generate client functions for a LAZYBONES:APP instance" :author "Colin Okay <okay@toyful.space>" :license "AGPLv3" - :version "0.1.4" + :version "0.1.5" :serial t :depends-on (#:lazybones) :components ((:file "lazybones-client"))) diff --git a/lazybones-client.lisp b/lazybones-client.lisp index 9945642..9fb3e15 100644 --- a/lazybones-client.lisp +++ b/lazybones-client.lisp @@ -11,6 +11,7 @@ (:export #:get #:put #:post #:head #:patch #:delete)) (defpackage #:lazybones-client.shared + (:intern #:req-string) (:export #:*host* #:*body* #:*cookies* #:*headers*)) (in-package :lazybones-client) @@ -100,7 +101,7 @@ COOKIES should be an instance of CL-COOKIE:COOKIE-JAR. Defaults to (intern (symbol-name (lazybones::endpoint-method ep)) :dexador))) `(defun ,defun-name (,@vars ,@(when qparams (cons '&key qparams))) ,(lazybones::endpoint-documentation ep) - (let ((req-string + (let ((lazybones-client.shared::req-string (apply #'concatenate 'string lazybones-client.shared:*host* @@ -108,8 +109,8 @@ COOKIES should be an instance of CL-COOKIE:COOKIE-JAR. Defaults to (when (or ,@qparams) (list "?" ,@(params-to-query-string qparams)))))) (if lazybones-client.shared:*body* - (,dex-fn req-string :content lazybones-client.shared:*body* :cookie-jar lazybones-client.shared:*cookies* :headers lazybones-client.shared:*headers*) - (,dex-fn req-string :cookie-jar lazybones-client.shared:*cookies* :headers lazybones-client.shared:*headers*)))))) + (,dex-fn lazybones-client.shared::req-string :content lazybones-client.shared:*body* :cookie-jar lazybones-client.shared:*cookies* :headers lazybones-client.shared:*headers*) + (,dex-fn lazybones-client.shared::req-string :cookie-jar lazybones-client.shared:*cookies* :headers lazybones-client.shared:*headers*)))))) (defun generate-client-functions-for-app (app) @@ -140,9 +141,12 @@ COOKIES should be an instance of CL-COOKIE:COOKIE-JAR. Defaults to (format out " -(defpackage #:lazybones-client.shared (:export #:*host* #:*body* #:*headers* #:*cookies*)) -(defpackage :~a (:use :cl :lazybones-client.shared) -(:export #:*host* #:*body* #:*headers* #:*cookies* #:request-with~% ~{#:~a~^~%~}))" +(defpackage #:lazybones-client.shared + (:intern #:req-string) + (:export #:*host* #:*body* #:*headers* #:*cookies*)) +(defpackage #:~a + (:use :cl :lazybones-client.shared) + (:export #:*host* #:*body* #:*headers* #:*cookies* #:request-with~% ~{#:~a~^~%~}))" (app-client-package-name app) (all-function-names app)) (terpri out) |