MCPcopy Create free account
hub / github.com/BrainicHQ/DoHSpeedTest / testGet

Function testGet

script.js:1171–1178  ·  view source on GitHub ↗
(mode)

Source from the content-addressed store, hash-verified

1169 };
1170
1171 const testGet = async (mode) => {
1172 const urlToUse = usesJsonApi ? jsonGetUrl : wireGetUrl;
1173 const headers = usesJsonApi ? DNS_JSON_HEADERS : DNS_MESSAGE_HEADERS;
1174 const response = await withTimeout(urlToUse, { method: 'GET', mode, headers });
1175 if (!response) return { success: false, cors: false };
1176 if (mode === 'cors') return { success: response.ok, cors: response.type === 'cors' };
1177 return { success: true, cors: false };
1178 };
1179
1180 const testPostCors = async () => {
1181 if (usesJsonApi) return { success: false, cors: false };

Callers 1

checkServerCapabilitiesFunction · 0.85

Calls 1

withTimeoutFunction · 0.85

Tested by

no test coverage detected