Download libraries/helpers/src/utils/internal.fetch.ts from Leon4gr45/postio: direct link, hf CLI and curl.
- Browser
- Download file 407 Bytes
-
https://huggingface.co/spaces/Leon4gr45/postio/resolve/main/libraries/helpers/src/utils/internal.fetch.ts
- Command line
-
hf download hf://spaces/Leon4gr45/postio/libraries/helpers/src/utils/internal.fetch.ts
-
curl -L -o internal.fetch.ts https://huggingface.co/spaces/Leon4gr45/postio/resolve/main/libraries/helpers/src/utils/internal.fetch.ts
407 Bytes
| import { cookies } from 'next/headers'; | |
| import { customFetch } from '@gitroom/helpers/utils/custom.fetch.func'; | |
| export const internalFetch = async (url: string, options: RequestInit = {}) => { | |
| const cookieStore = await cookies(); | |
| return customFetch( | |
| { baseUrl: process.env.BACKEND_INTERNAL_URL! }, | |
| cookieStore?.get('auth')?.value!, | |
| cookieStore?.get('showorg')?.value! | |
| )(url, options); | |
| }; | |