- const payload = {
- secretId: config.secretId,
- secretKey: config.secretKey,
- zoneId: config.zoneId,
- type: type,
- targets: config.targets,
- method: method
- };
- try {
- const response = await fetch('https://eo-cleancache.czl.net/', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify(payload)
- });
- const result = await response.json();
- document.getElementById('resultContent').textContent = JSON.stringify(result, null, 2);
- } catch (error) {
- document.getElementById('resultContent').textContent = '错误:' + error.message;