如何使用Swift访问存储在S3存储桶中的受保护JSON?
我的凭据是AccessKey和SecurityKey。
我配置:
const request = require('request-promise');
const { writeFile } = require('fs').promises;
async function getWeeklyReport(queryString) {
let result;
const response = await request({..., resolveWithFullResponse: true });
if (response.statusCode === 200) {
result = response.body;
} else if (response.statusCode === 409) {
await new Promise(resolve => setTimeout(resolve, response.headers['Retry-After'] * 1000));
result = await getWeeklyReport(queryString);
} else {
throw response;
}
await writeFile('test3.xlsm', result);
}
但是如何告诉代码“确定,我进入了。现在访问URL”?