Fork me on GitHub
#clojurescript
<
2020-09-20
>
Timofey Sitnikov12:09:24

Hello Clojurians, I am trying to learn how to get data from server when the home page is loaded. I am following the https://github.com/metosin/reitit/tree/master/examples/frontend, but it does not seem to indicate on how to request the data from the server, for example from GET /mydata route, which will return a json. Is there a function I should look up?

Felipe Marques12:09:26

I believe you can use the Google Closure Library XHRIO https://developers.google.com/closure/library/docs/xhrio

Timofey Sitnikov12:09:08

Hmm, so it is a whole external lib, not part of reitit, interesting.

Felipe Marques13:09:27

I believe reitit is just for routing. For doing http you are going to need other solutions.