Function
sendDriveRequest
(
accessToken: string,
url: string,
init?: RequestInit,
)
Source from the content-addressed store, hash-verified
| 418 | }); |
| 419 | |
| 420 | const 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 | |
| 434 | const driveFetch = ( |
| 435 | config: GoogleDriveIntegrationConfig, |
Tested by
no test coverage detected