This commit is contained in:
parent
ef5391787a
commit
47e615ebf4
1 changed files with 2 additions and 2 deletions
|
@ -12,7 +12,7 @@
|
||||||
(with/a [client (.AsyncClient httpx)]
|
(with/a [client (.AsyncClient httpx)]
|
||||||
(let [headers {"User-Agent" config.USER_AGENT
|
(let [headers {"User-Agent" config.USER_AGENT
|
||||||
"Accept" config.AP_CONTENT_TYPE}]
|
"Accept" config.AP_CONTENT_TYPE}]
|
||||||
(await (.get client url :headers headers)))))))
|
(await (.get client url :headers headers :timeout 15)))))))
|
||||||
|
|
||||||
(defn/a post
|
(defn/a post
|
||||||
[url payload]
|
[url payload]
|
||||||
|
@ -20,6 +20,6 @@
|
||||||
(let [headers {"User-Agent" config.USER_AGENT
|
(let [headers {"User-Agent" config.USER_AGENT
|
||||||
"Accept" config.AP_CONTENT_TYPE}]
|
"Accept" config.AP_CONTENT_TYPE}]
|
||||||
(setv resp
|
(setv resp
|
||||||
(await (.post client url :headers headers :json payload :auth auth)))
|
(await (.post client url :headers headers :json payload :auth auth :timeout 15)))
|
||||||
(.raise_for_status resp)
|
(.raise_for_status resp)
|
||||||
(return resp))))
|
(return resp))))
|
||||||
|
|
Loading…
Reference in a new issue