wegry
wegry

Reputation: 8147

Async calls with cljs-ajax

Is cljs-ajax's ajax-request synchronous? If it does not, why is there a distinction between it and the default GET and POST API?

(defn submit [state] 
  (let [request {
                 :uri "/new-posting"
                 :method :post
                 :params (clj->js @state)
                 :handler #(js/alert %)
                 :format :json
                 :response-format :json 
                 }
        response (ajax-request request)]))

Upvotes: 0

Views: 182

Answers (1)

wegry
wegry

Reputation: 8147

It looks like all of the functions are asynchronous (GET and POST as well). I went and created an issue on Github about this. Julian Birch responded in

https://github.com/JulianBirch/cljs-ajax/issues/112

Upvotes: 1

Related Questions