MCPcopy Create free account
hub / github.com/Datakitpage/Datakit / logApiCall

Function logApiCall

frontend/src/lib/api/debugHelper.ts:1–5  ·  view source on GitHub ↗
(method: string, url: string, data?: any)

Source from the content-addressed store, hash-verified

1export const logApiCall = (method: string, url: string, data?: any) => {
2 if (import.meta.env.DEV) {
3 console.log(`🔗 API ${method.toUpperCase()} ${url}`, data ? { data } : '');
4 }
5};
6
7export const logApiResponse = (url: string, response: any, error?: any) => {
8 if (import.meta.env.DEV) {

Callers 2

requestMethod · 0.90
streamMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected