🎉 first commit

This commit is contained in:
LIlGG
2025-09-24 13:06:25 +08:00
commit 1f4fb103e9
409 changed files with 61222 additions and 0 deletions

10
app/lib/fetch.ts Normal file
View File

@@ -0,0 +1,10 @@
type CommonRequest = Omit<RequestInit, 'body'> & { body?: URLSearchParams | FormData | string };
export async function request(url: string, init?: CommonRequest) {
const nodeFetch = await import('node-fetch');
const https = await import('node:https');
const agent = url.startsWith('https') ? new https.Agent({ rejectUnauthorized: false }) : undefined;
return nodeFetch.default(url, { ...init, agent });
}