MCPcopy Create free account
hub / github.com/codename-co/stack / fetcher

Function fetcher

packages/website/src/helpers/stackApi.ts:3–9  ·  view source on GitHub ↗
(endpoint: string, init?: RequestInit)

Source from the content-addressed store, hash-verified

1const STACK_API_ORIGIN = "https://127.1:57404";
2
3const fetcher = async (endpoint: string, init?: RequestInit) => {
4 const response = await fetch(`${STACK_API_ORIGIN}${endpoint}`, init);
5 if (!response.ok) {
6 throw new Error(response.statusText);
7 }
8 return response.text();
9};
10
11export const isApiAccessible = async () => {
12 try {

Callers 2

isApiAccessibleFunction · 0.85
runStackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected