I am completely new to JS, Ajax, etc and Scala JS. I have a small REST API, where i can send GET requests(e.g localhost:9000/stats?first=abc&second=cde&from=1482327698&to=1482327998)
How can i do it in Scala JS? I tried this:
val successButton = Button(ButtonStyle.success)("Plot", onclick.:=(Bootstrap.jsClick(_ => {
val subj1 = firstText.now
val subj2 = secondText.now
val now = System.currentTimeMillis / 1000
val from = now - 300
val url = s"http://127.0.0.1:9000/stats?first=$subj1&second=$subj2&from=$from&to=$now"
jQuery.get(url)
}))).render
But it gives me literally nothing. Thanks in advance