aboutsummaryrefslogtreecommitdiffstats
path: root/app/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Main.hs')
-rw-r--r--app/Main.hs16
1 files changed, 15 insertions, 1 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 2f0cce9..1b1fa25 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -28,6 +28,7 @@ import Halogen.HTML.Layout.GridBagLayout
import Halogen.HTML.Properties as HP
import Halogen.Subscription qualified as HS
import Halogen.VDom.DOM.Monad
+import JavaScript.Web.XMLHttpRequest
import Protolude hiding (log)
import UnliftIO (MonadUnliftIO)
@@ -110,7 +111,20 @@ component =
handleAction = \case
Init ->
- lift $ log "Initialized"
+ lift $ do
+ log "Initialized"
+ _ <-
+ liftIO $ xhrByteString
+ ( Request
+ { reqMethod = GET,
+ reqURI = "http://localhost:8081/api/rest/collection/user",
+ reqLogin = Nothing,
+ reqHeaders = [],
+ reqWithCredentials = False,
+ reqData = NoData
+ }
+ )
+ pure ()
Increment n -> do
modify (+ n)
get >>= H.raise