MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / safeFetch

Function safeFetch

app/utilities/safeFetch.ts:1–12  ·  view source on GitHub ↗
(
  url: string,
  options: RequestInit = {}
)

Source from the content-addressed store, hash-verified

1export default function safeFetch(
2 url: string,
3 options: RequestInit = {}
4): Promise<Response> {
5 return fetch(url, {
6 ...options,
7 headers: {
8 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36",
9 ...options.headers,
10 },
11 });
12}

Callers 3

createFromUrlFunction · 0.85
loaderFunction · 0.85
getUriPreviewFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected