File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
swagger-config/transactional/javascript/templates Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 11{ {> licenseInfo} }
22var axios = require('axios');
33
4- axios.defaults.timeout = 300000; // 300s
4+ var axiosInstance = axios.create({
5+ timeout: 300000 // 300s
6+ } );
7+
58
69{ {#apiInfo} }{ {#apis} }{ {#operations} }{ {#operation} }{ {#-first} }var { {baseName} } = require('./api/{ {classname} }');
710{ {/-first} }{ {/operation} }{ {/operations} }{ {/apis} }{ {/apiInfo} }
@@ -47,7 +50,7 @@ exports.prototype.post = function post(path, body = {}) {
4750 url = url + ' .' + defaultOutputFormat;
4851 }
4952
50- return axios
53+ return axiosInstance
5154 .post(url, body)
5255 .then(function (response) {
5356 return response.data;
@@ -66,7 +69,7 @@ exports.prototype.setDefaultOutputFormat = function (outputFormat) {
6669};
6770
6871exports.prototype.setDefaultTimeoutMs = function (timeoutMs) {
69- axios .defaults.timeout = timeoutMs;
72+ axiosInstance .defaults.timeout = timeoutMs;
7073}
7174
7275// The default API client implementation.
You can’t perform that action at this time.
0 commit comments