Use node-fetch to make requests without timeout #435

This commit is contained in:
Cohee
2023-06-04 04:29:22 +03:00
parent 0dbf219116
commit c299ef0a86
3 changed files with 5 additions and 4 deletions

View File

@@ -2684,7 +2684,8 @@ function putAsync(url, args) {
}
async function postAsync(url, args) {
const response = await fetch(url, { method: 'POST', ...args });
const fetch = require('node-fetch').default;
const response = await fetch(url, { method: 'POST', timeout: 0, ...args });
if (response.ok) {
const data = await response.json();