mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Use node-fetch to make requests without timeout #435
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user