MCPcopy Create free account
hub / github.com/bridge-codes/bridge / getQueryUrl

Function getQueryUrl

examples/minimal-http/sdk/bridgeFetchMethod.ts:15–22  ·  view source on GitHub ↗
(query: FETCH['query'])

Source from the content-addressed store, hash-verified

13}
14
15const getQueryUrl = (query: FETCH['query']): string => {
16 if (!query || !Object.values(query).some((val) => val)) return '';
17
18 return Object.entries(query)
19 .filter(([_, value]) => value !== undefined)
20 .map(([key, value]) => `${key}=${value}`)
21 .join('&');
22};
23
24export default async ({ path, method, body, query, headers, file }: FETCH) => {
25 let completeUrl = serverUrl + path;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected