This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-14
Channels
- # beginners (116)
- # boot (6)
- # cider (16)
- # cljdoc (5)
- # cljsrn (3)
- # clojure (156)
- # clojure-conj (5)
- # clojure-finland (1)
- # clojure-italy (46)
- # clojure-mexico (36)
- # clojure-russia (2)
- # clojure-sanfrancisco (1)
- # clojure-spec (10)
- # clojure-uk (69)
- # clojurescript (71)
- # core-async (2)
- # cursive (18)
- # datomic (91)
- # duct (2)
- # editors (1)
- # emacs (5)
- # figwheel-main (11)
- # fulcro (31)
- # graphql (8)
- # hispano (1)
- # jobs (1)
- # jobs-discuss (2)
- # lambdaisland (1)
- # london-clojurians (1)
- # nyc (1)
- # off-topic (104)
- # onyx (34)
- # parinfer (3)
- # pedestal (2)
- # precept (17)
- # protorepl (2)
- # re-frame (13)
- # reagent (4)
- # ring-swagger (52)
- # shadow-cljs (92)
- # spacemacs (17)
- # sql (14)
- # tools-deps (6)
- # unrepl (4)
- # vim (39)
does the http-fx library encourage you to handle the http logic as an event? if so, why? we were considering hiding that we were making a http call, by which i mean making our request handler a effect handler. is there a reason to not go this route?
i ask because it seems akward to call dispatch inside a effect handler e.g
reg-fx ::request (dispatch :http-xhiro)
i think im having a issue with having my dispatch name be xhiro rather then something like http/request
from a readability perspective and also as a way to decouple things a bit
hello everyone, just studying re-frame (wonderful piece of work, very educational). I’m wondering if a re-frame app could take advantage by using a pub/sub stream instead of an event queue
Reframe under the hood, is making an HTTP OPTIONS
call to /my/endpoint
. But I don’t see documentation for this?
Is there a way to control or turn this off?
2xhrio.js:620 OPTIONS 404 (Not Found)
goog.net.XhrIo.send @ xhrio.js:620
goog.net.XhrIo.ajax$protocols$AjaxImpl$_js_ajax_request$arity$3 @ xhrio.cljs:23
ajax$protocols$_js_ajax_request @ protocols.cljc:6
ajax$core$raw_ajax_request @ core.cljc:500
ajax$core$ajax_request @ core.cljc:503
day8$re_frame$http_fx$http_effect @ http_fx.cljs:87
(anonymous) @ fx.cljc:39
(anonymous) @ core.cljs:4466
cljs.core.map.cljs$core$IFn$_invoke$arity$2 @ core.cljs:4466
cljs.core.LazySeq.sval @ core.cljs:3223
cljs.core.LazySeq.cljs$core$ISeqable$_seq$arity$1 @ core.cljs:3277
cljs$core$seq @ core.cljs:1107
cljs.core.Cons.cljs$core$INext$_next$arity$1 @ core.cljs:3065
cljs$core$next @ core.cljs:1152
cljs.core.LazySeq.cljs$core$INext$_next$arity$1 @ core.cljs:3260
cljs$core$next @ core.cljs:1152
cljs.core.dorun.cljs$core$IFn$_invoke$arity$1 @ core.cljs:9033
cljs.core.doall.cljs$core$IFn$_invoke$arity$1 @ core.cljs:9046
cljs$core$doall @ core.cljs:9038
re_frame$fx$do_fx_after @ fx.cljc:40
re_frame$interceptor$invoke_interceptor_fn @ interceptor.cljc:68
re_frame$interceptor$invoke_interceptors @ interceptor.cljc:106
re_frame$interceptor$execute @ interceptor.cljc:199
re_frame$events$handle @ events.cljc:59
re_frame.router.EventQueue.re_frame$router$IEventQueue$_process_1st_event_in_queue$arity$1 @ router.cljc:169
re_frame$router$_process_1st_event_in_queue @ router.cljc:82
re_frame.router.EventQueue.re_frame$router$IEventQueue$_run_queue$arity$1 @ router.cljc:188
re_frame$router$_run_queue @ router.cljc:84
(anonymous) @ router.cljc:140
re_frame.router.EventQueue.re_frame$router$IEventQueue$_fsm_trigger$arity$3 @ router.cljc:159
re_frame$router$_fsm_trigger @ router.cljc:78
(anonymous) @ router.cljc:177
channel.port1.onmessage @ nexttick.js:211
@twashing i don't think you have much control over an OPTIONS
request. your browser is doing that to see what it's allowed to ask for. it's not re-frame specific.
Hmm, then that stacktrace is deceptive. Because that’s what’s making the OPTIONS
call.
what happens when you visit https://foobar/my/endpoint in your browser?