(text: string)
| 413 | class HttpClient { |
| 414 | |
| 415 | static cleanResponseText(text: string): string { |
| 416 | if (!text) return text; |
| 417 | return text |
| 418 | .replace(/^\uFEFF/, '') |
| 419 | .replace(/\uFFFD/g, '') |
| 420 | .replace(/[\uFFFC\uFFFF\uFFFE]/g, '') |
| 421 | .replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g, '') |
| 422 | .replace(/[\uDC00-\uDFFF]/g, '') |
| 423 | .replace(/[\uD800-\uDBFF](?![\uDC00-\uDFFF])/g, '') |
| 424 | .normalize('NFKC') |
| 425 | .normalize('NFKC'); |
| 426 | } |
| 427 | |
| 428 | static async makeRequest(url: string, options: HttpRequestOptions = {}): Promise<HttpResponse> { |
| 429 | return new Promise((resolve, reject) => { |
no test coverage detected