MCPcopy
hub / github.com/lissy93/web-check / fetchRdapFallback

Function fetchRdapFallback

api/whois.js:77–87  ·  view source on GitHub ↗
(domain)

Source from the content-addressed store, hash-verified

75
76// Last-resort lookup via rdap.org (a meta-resolver that bootstraps the right RDAP server)
77const fetchRdapFallback = async (domain) => {
78 try {
79 const res = await fetch(`https://rdap.org/domain/${encodeURIComponent(domain)}`, {
80 signal: AbortSignal.timeout(TIMEOUT),
81 });
82 if (!res.ok) return null;
83 return rdapToWhoiserShape(await res.json());
84 } catch {
85 return null;
86 }
87};
88
89// Whether a parsed result set has anything worth returning to the frontend
90const hasUsefulData = (r) =>

Callers 1

whoisHandlerFunction · 0.85

Calls 1

rdapToWhoiserShapeFunction · 0.85

Tested by

no test coverage detected