Requests are not working correctly because request options are not processed correctly. The offset is off by one, because second timeout parameter is not implemented here.
// line 177ff. in public-interface.js
helpers.processData(options.data, options.serializer, function (data) {
exec(onSuccess, onFail, 'CordovaHttpPlugin', options.method, [url, data, options.serializer, headers, options.connectTimeout, options.readTimeout, options.followRedirect, options.responseType, reqId]);
});
// maps to following cordova proxy implementation line 154ff. in cordova-http-plugin.js
var data, serializer, headers, timeout, followRedirect, responseType, reqId;
var url = opts[0];
if (withData) {
data = opts[1];
serializer = opts[2];
headers = opts[3];
timeout = opts[4]; // should be connectTimeout
followRedirect = opts[5]; // following offsets are wrong because readTimeout is missing here
responseType = opts[6];
reqId = opts[7];
} else {
headers = opts[1];
timeout = opts[2]; // see above
followRedirect = opts[3];
responseType = opts[4];
reqId = opts[5];
}
Requests are not working correctly because request options are not processed correctly. The offset is off by one, because second timeout parameter is not implemented here.