MCPcopy Create free account
hub / github.com/PIKACHUIM/CFWorkerACME / dnsAPI

Function dnsAPI

src/agent.ts:76–96  ·  view source on GitHub ↗
(method: string = "POST",
                             url: string,
                             header: Record<string, any>,
                             body: BodyInit | null | undefined)

Source from the content-addressed store, hash-verified

74}
75
76export async function dnsAPI(method: string = "POST",
77 url: string,
78 header: Record<string, any>,
79 body: BodyInit | null | undefined) {
80 try {
81 console.log(method, url);
82 const response = await fetch(url,
83 {
84 method: method,
85 headers: header,
86 body: body
87 }
88 );
89 const data: Record<string, any> = await response.json();
90 // console.log('Result:', data);
91 return data;
92 } catch (error) {
93 console.error(error);
94 return {};
95 }
96}

Callers 3

dnsAddFunction · 0.85
dnsAllFunction · 0.85
uidDelFunction · 0.85

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected