Clojure 从围棋区获取信息
我有以下ClojureScript代码来发出POST请求:Clojure 从围棋区获取信息,clojure,clojurescript,core.async,Clojure,Clojurescript,Core.async,我有以下ClojureScript代码来发出POST请求: (defn perform-post [resource] "Performs a post and returns the body :)" (go (let [response (<! (http/post resource))] (:body response)))) 这张照片是: buf对象{buf={…},n=1,cljs$lang$protocol\u mask$partition0$=2,
(defn perform-post [resource]
"Performs a post and returns the body :)"
(go (let [response (<! (http/post resource))]
(:body response))))
这张照片是:
buf对象{buf={…},n=1,cljs$lang$protocol\u mask$partition0$=2,
更多…}
buf
对象{head=1,tail=0,length=1,meer…} arr
[“6276677237104933520”,未定义] 我想获得“6276677237104933520”(帖子正文)信息作为“return”值 我怎样才能做到这一点?我尝试了
,但由于它没有定义,所以无法工作。ClojureScript平台上没有阻塞语义()
只能在go
块中从通道检索值:
(go (js/console.log (<! (perform-post post-create-recipe-url))))
(转到(js/console.log)(谢谢!我正在使用atom并为其赋值。我以后需要它:)。
(go (js/console.log (<! (perform-post post-create-recipe-url))))