This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-03
Channels
- # boot-dev (1)
- # cider (27)
- # cljsjs (6)
- # cljsrn (11)
- # clojure (249)
- # clojure-dusseldorf (1)
- # clojure-finland (1)
- # clojure-greece (1)
- # clojure-italy (28)
- # clojure-nl (12)
- # clojure-russia (2)
- # clojure-spec (5)
- # clojure-uk (27)
- # clojurescript (24)
- # clojutre (2)
- # component (8)
- # cryogen (1)
- # cursive (7)
- # datomic (61)
- # editors (18)
- # emacs (1)
- # events (1)
- # figwheel (4)
- # fulcro (35)
- # graphql (4)
- # jobs (3)
- # jobs-rus (1)
- # keechma (1)
- # leiningen (1)
- # london-clojurians (1)
- # luminus (62)
- # off-topic (154)
- # onyx (23)
- # pedestal (43)
- # portkey (66)
- # re-frame (49)
- # reagent (23)
- # shadow-cljs (92)
- # tools-deps (113)
- # uncomplicate (2)
is it possible to get refrisk to show me the application state atom for my om.next project?
@sova the data structure widget in re-frisk is datafrisk: https://github.com/Odinodin/data-frisk-reagent
you could probably use it from Om.next, but you'd need to pull in reagent and use reactify-component
does anyone have much experience with https://github.com/JulianBirch/cljs-ajax ? i can hit https://jsonplaceholder.typicode.com/users and get a response back via curl or a GET call with the library above, but when i try to hit darksky’s weather api it get “request failed” but using the same string it get a response back via curl :thinking_face:
Could be a CORS issue. I'm pretty bad at those.
contents of the url string shouldn’t be an issue right? some things redacted to protect the innocent 🙂
""
@lee.justin.m forgive my ignorance but if i’m just making a single call how is that cross-origin resource sharing? kinda bummed because im not seeing how i can call darksky’s api as they have CORS disabled
@chadhs not sure how the darksky api works, but if you serve from one domain (say, localhost) and then request from another (say, darksky), the darksky headers need to allow cross-origin requests in their headers. is there some kind of cookie or token you are supposed to be sending? maybe setting the with-credentials boolean is what you need?
@lee.justin.m it works in browser and via curl but not calling via the GET function from cljs-ajax
you got it working from a browser using a different library? because looking at the FAQ, I’m having a hard time understanding how that could ever work: `We disable CORS to help keep your API secret key a secret. To prevent API key abuse, you should set up a proxy server to make calls to our API behind the scenes. Then you can provide forecasts to your clients without exposing your API key.`
i think that because the api encodes the secret key in the url, they simply don’t want you to make the call from the browser at all or you’d end up leaking your key. you are supposed to set up an endpoint on the server which relays the information
Oh hey, that explains what was going on with an API I was using a few weeks ago...
That makes sense
@lee.justin.m so a client only app wouldn’t work for this?
@lee.justin.m so it could just be a simple single endpoint ring app and have the client app call that endpoint? am i understanding this correctly?