范例代码:
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("http://localhost:41595/api/library/history", requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
返回结果:
{
"status": "success",
"data": [
"/Users/augus/Google 云端硬盘/设计领域.library",
"/Users/augus/Google 云端硬盘/辦公室風格.library",
"/Users/augus/Google 云端硬盘/设计素材库.library"
]
}