Using ajax
Plasma was build with an Ajax help. This helper will come with 2 methods : get(url) post(url, params) both will return promise here is some exemples :
Ajax.get("myURL").then((res) => {
//a simple get method. res is the result retrieved from the request
})
let postData = {
authToken: Session.getToken()
}
Ajax.post("myURL", postData).then((res) => {
//a simple post method. res is the result retrieved from the request
})
Don't forget imports
Last updated