From 8a7877c9ceabf9ca9221551d3451818e13224714 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 7 May 2022 17:41:50 +0200 Subject: fetch-issues: Change POST data to Lisp alist Instead of POSTing a string literal, define it with an alist and use 'jzon' to convert it to JSON. --- src/main.lisp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main.lisp b/src/main.lisp index 31814bb..39b8fb5 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -15,11 +15,9 @@ (jzon:parse (dex:post "https://example.atlassian.net/rest/api/3/search" :content - (format nil "{ - \"jql\": \"~A\", - \"fields\": [\"id\", \"key\", \"self\"] - }" - jql) + (jzon:stringify + `((:jql . ,jql) + (fields . ("id" "key" "self")))) :headers `((:content-type . "application/json") (:authorization . ,(format nil "Basic ~A" basic-auth-token)))))) -- cgit v1.2.3