(text: string)
| 466 | .normalize("NFKC"); |
| 467 | } |
| 468 | |
| 469 | static async makeRequest(url: string, options: any = {}): Promise<any> { |
| 470 | return new Promise((resolve, reject) => { |
| 471 | const { method = "GET", headers = {}, data, timeout = 60000 } = options; // Increased default timeout |
| 472 | const isHttps = url.startsWith("https:"); |
| 473 | const client = isHttps ? https : http; |
| 474 | |
| 475 | const req = client.request( |
| 476 | url, |
| 477 | { |
| 478 | method, |
| 479 | headers: { |
| 480 | "Content-Type": "application/json", |
| 481 | "User-Agent": "TeleBox/1.0", |
no test coverage detected