var xhr = new XMLHttpRequest();
xhr.responseType = 'String';
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
var response = xhr.response;
console.log(response);
}
};
xhr.open('POST', 'https://api.dropboxapi.com/2/files/list_folder');
xhr.setRequestHeader('Authorization', 'Bearer ' + token);
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('Dropbox-API-Arg', JSON.stringify({
path: '/lol'
}));
xhr.send();
Ich kann nicht herausfinden, was im Code falsch scheint. Irgendeine Hilfe?Dropbox list_folder api Javascript funktioniert nicht
Was funktioniert nicht genau? Welche Antwort bekommst du? – Greg