slingxshot
8 years agoStreaming Star
roUrlTransfer send POST as JSON
I was wondering how I would send the data as JSON. If anyone has any examples.
I am trying to basically duplicate this... I am guessing this javascript sample is sending data as JSON?
var templateXHR = new XMLHttpRequest();
templateXHR.responseType = "json";
templateXHR.addEventListener("load", function() { }, false);
templateXHR.open("POST", checkIfReadyURL, true);
templateXHR.send("code="+deviceCodeResult+"&grant_type=http://oauth.net/grant_type/device/1.0&client_id=ott&client_secret=123");
Thanks!
I am trying to basically duplicate this... I am guessing this javascript sample is sending data as JSON?
var templateXHR = new XMLHttpRequest();
templateXHR.responseType = "json";
templateXHR.addEventListener("load", function() { }, false);
templateXHR.open("POST", checkIfReadyURL, true);
templateXHR.send("code="+deviceCodeResult+"&grant_type=http://oauth.net/grant_type/device/1.0&client_id=ott&client_secret=123");
Thanks!