ispapi-apiconnector
Advanced tools
Comparing version 4.0.13 to 4.0.14
@@ -99,9 +99,6 @@ /* | ||
}; | ||
var tmp = require("url").parse(p_uri || | ||
'https://coreapi.1api.net/api/call.cgi'); | ||
options.port = ( | ||
tmp.port || (/^https/i.test(tmp.protocol) ? '443' : '80') | ||
); | ||
var tmp = require("url").parse(p_uri || 'https://coreapi.1api.net/api/call.cgi'); | ||
options.port = ( tmp.port || (/^https/i.test(tmp.protocol) ? '443' : '80')); | ||
options.protocol = tmp.protocol; | ||
options.host = tmp.host; | ||
options.host = tmp.host.replace(/\:.+$/, ''); //remove port | ||
options.path = tmp.path; | ||
@@ -108,0 +105,0 @@ return options; |
@@ -0,1 +1,6 @@ | ||
4.0.14 / 2017-07-12 | ||
=================== | ||
* delete port in hostname (e.g. when using 127.0.0.1:8033) | ||
* increased API socket timeout to 300s | ||
4.0.13 / 2017-04-03 | ||
@@ -2,0 +7,0 @@ =================== |
{ | ||
"name": "ispapi-apiconnector", | ||
"description": "1API API Connector for node.js", | ||
"version": "4.0.13", | ||
"version": "4.0.14", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Kai Schwarz", |
@@ -8,2 +8,3 @@ /* | ||
var DEFAULT_SOCKET_TIMEMOUT = 300000; | ||
var util = require("util"); | ||
@@ -71,5 +72,5 @@ var events = require("events"); | ||
); | ||
//250s (to be sure to get an API response) | ||
//300s (to be sure to get an API response) | ||
req.on('socket', function(socket) { | ||
socket.setTimeout(250000, function() { | ||
socket.setTimeout(DEFAULT_SOCKET_TIMEMOUT, function() { | ||
req.abort(); | ||
@@ -76,0 +77,0 @@ }); |
80362
1660