Hi All - I am attempting to get started in ClojureScript and am completely flummoxed on getting my connectivity set up.
I have a web server running on my local machine such that http://localhost:8080/m yields my data correctly (just a test URL...) I am attempting to connect using the following cljs (ns hello.foo.dat (:require [goog.net.XhrIo :as gxhr] [goog.Uri :as uri] [cljs.reader :as reader])) (defn- extract-response [message] (reader/read-string (. message/target (getResponseText)))) (defn get-data [_] (gxhr/send (goog.Uri. "http://localhost:8080/m") extract-response)) However when I attempt to execute this function in the browser I get 'undefined' returned. Anything you can see here that I am doing wrong? This does appear to execute correctly (i.e. the function is called, as a hard coded return string does return correctly) Any help is most welcomed! Thanks, Base -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
