MCPcopy Index your code
hub / github.com/CapSoftware/Cap / sendDriveRequest

Function sendDriveRequest

packages/web-backend/src/Storage/GoogleDrive.ts:420–432  ·  view source on GitHub ↗
(
	accessToken: string,
	url: string,
	init?: RequestInit,
)

Source from the content-addressed store, hash-verified

418 });
419
420const sendDriveRequest = (
421 accessToken: string,
422 url: string,
423 init?: RequestInit,
424) =>
425 Effect.tryPromise({
426 try: () => {
427 const headers = new Headers(init?.headers);
428 headers.set("Authorization", `Bearer ${accessToken}`);
429 return fetch(url, { ...init, headers });
430 },
431 catch: (cause) => new Storage.StorageError({ cause }),
432 });
433
434const driveFetch = (
435 config: GoogleDriveIntegrationConfig,

Callers 1

driveFetchFunction · 0.85

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected