Commit 47e24d85 authored by Alain Takoudjou's avatar Alain Takoudjou

jio ajax: allow to set a request timeout value

parent 39feb6e5
......@@ -72,6 +72,12 @@
}
}
}
if (param.timeout !== undefined && param.timeout !== 0) {
xhr.timeout = param.timeout;
xhr.ontimeout = function (e) {
return reject(e);
};
}
if (typeof param.beforeSend === 'function') {
param.beforeSend(xhr);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment