try {
const response = await fetch('https://cloudflare-dns.com/dns-query?name=nyaight.me&type=TXT',{headers: {'accept': 'application/dns-json'}});
if (!response.ok) {
throw new Error(`レスポンスステータス: ${response.status}`);
}
const json = await response.json();
console.log(json);
} catch (error) {
console.error(error.message);
}