There is such a piece of jquery code with a post to the server:
//Build the command string that will be passed to the spark core's //setRgb function. The command will be in the format of "r,g,b" var command = localRed + ',' + localGrn + ',' + localBlu; //Create the url for the spark core's setRgb function with the //required coreId value. var url = "https://api.spark.io/v1/devices/" + coreId + "/setRgb"; //Show the ajax_loader div to indicate that the post has begun //the div overlays the slider controls and prevents the sliders //from being changed while the update is in progress. This $('#ajax_loader').show(); //Create a jQuery.ajax request to post the new RGB values to the setRgb function $.ajax({ type: "POST", url: url, data: { access_token: accessToken, args: command }, }).then(function () { //Then set the posting flag to false so another post can run posting = false; //hide the ajax_loader div $('#ajax_loader').hide(); }); }; I can not rewrite on https://github.com/pagekit/vue-resource
here is what I get, the connection passes, access_token is inserted into the request, but the additional arguments localRed + ',' + localGrn + ',' + localBlu cannot pass:
this.$http.post('https://api.spark.io/v1/devices/3b0041000747343232363230/setRgb?access_token=ba2b57075f7261d9751ef46c50fe3440d5ef1c8d').then(function(response) { console.log("Sucess post") }, function(error) { console.log("Error post!") })