使用 curl 进行 ajax 调用
Using curl to make ajax call
curl -X DELETE https://www.filestackapi.com/api/file/**HANDLE**?key=APIKEY
我想使用上面的 curl 调用从文件堆栈存储中删除一个文件。我如何在使用 jQuery 或 SuperAgent 的 ajax 调用中使用它?
与jQuery:
$.ajax({
url: 'https://www.filestackapi.com/api/file/HANDLE?key=APIKEY',
type: 'DELETE',
success: function(result) {
// Do something with the result
}
});
有超级代理人
request
.del('https://www.filestackapi.com/api/file/HANDLE?key=APIKEY')
.end(function(err, res){
});
curl -X DELETE https://www.filestackapi.com/api/file/**HANDLE**?key=APIKEY
我想使用上面的 curl 调用从文件堆栈存储中删除一个文件。我如何在使用 jQuery 或 SuperAgent 的 ajax 调用中使用它?
与jQuery:
$.ajax({
url: 'https://www.filestackapi.com/api/file/HANDLE?key=APIKEY',
type: 'DELETE',
success: function(result) {
// Do something with the result
}
});
有超级代理人
request
.del('https://www.filestackapi.com/api/file/HANDLE?key=APIKEY')
.end(function(err, res){
});