Skip to content

Commit ddde20d

Browse files
committed
[new] [#342] Smarter Ajax XHR acquisition, opt to control pool
1 parent 76b8abc commit ddde20d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/taoensso/sente.cljc

+3-1
Original file line numberDiff line numberDiff line change
@@ -1527,6 +1527,7 @@
15271527
:timeout-ms (or (:timeout-ms ajax-opts)
15281528
default-client-side-ajax-timeout-ms)
15291529
:resp-type :text ; Prefer to do our own pstr reading
1530+
:xhr-cb-fn (fn [xhr] (reset! curr-xhr_ xhr))
15301531
:params
15311532
(merge
15321533
;; Note that user params here are actually POST
@@ -1694,7 +1695,8 @@
16941695
:headers ; Map of additional headers to include in the initiating request
16951696
; (currently only for Java clients).
16961697
:packer ; :edn (default), or an IPacker implementation.
1697-
:ajax-opts ; Base opts map provided to `taoensso.encore/ajax-lite`.
1698+
:ajax-opts ; Base opts map provided to `taoensso.encore/ajax-lite`, see
1699+
; relevant docstring for more info.
16981700
:wrap-recv-evs? ; Should events from server be wrapped in [:chsk/recv _]?
16991701
; Default false for Sente >= v1.18, true otherwise.
17001702

0 commit comments

Comments
 (0)