From 00d71d43ed987bc55c7affbf5400e3aae11f97be Mon Sep 17 00:00:00 2001 From: SouthFox Date: Mon, 30 Sep 2024 00:42:10 +0800 Subject: [PATCH] [fix] compatible with hy 1.0.0 --- app/hyap.hy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/hyap.hy b/app/hyap.hy index 5ed614a..fe88e91 100644 --- a/app/hyap.hy +++ b/app/hyap.hy @@ -5,18 +5,18 @@ (import app.httpsig [auth]) -(defn/a fetch +(defn :async fetch [url] (.info logger url) (return (.json - (with/a [client (.AsyncClient httpx)] + (with [:async client (.AsyncClient httpx)] (let [headers {"User-Agent" config.USER_AGENT "Accept" config.AP_CONTENT_TYPE}] (await (.get client url :headers headers :timeout 15))))))) -(defn/a post +(defn :async post [url payload] - (with/a [client (.AsyncClient httpx)] + (with [:async client (.AsyncClient httpx)] (let [headers {"User-Agent" config.USER_AGENT "Content-Type" config.AP_CONTENT_TYPE}] (setv resp