mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-06 22:36:27 +00:00
10 lines
331 B
JavaScript
10 lines
331 B
JavaScript
const { default: axios } = require('axios');
|
|
|
|
// Kegagalan CTS harus selesai pada jalur error yang sudah dimiliki endpoint.
|
|
function postWithDeadline(url, data, config) {
|
|
const timeout = 5000;
|
|
return axios.post(url, data, { ...config, timeout, signal: AbortSignal.timeout(timeout) });
|
|
}
|
|
|
|
module.exports = { postWithDeadline };
|