0
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();
코드에 무엇이 잘못 표시되는지 알 수 없습니다. 어떤 도움?보관함 list_folder api 자바 스크립트가 작동하지 않습니다.
정확히 작동하지 않는 것은 무엇입니까? 당신은 어떤 반응을 얻습니까? – Greg