Remove custom request user-agent strings

This commit is contained in:
Joe Uhren
2022-06-04 16:27:18 -06:00
parent 2841f67b94
commit d062fba973
10 changed files with 61 additions and 61 deletions
+25 -25
View File
@@ -168,7 +168,7 @@ module.exports = {
// get data via internal web api request
var uri = base_url + 'getmininginfo';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.') {
// return a blank value
@@ -224,7 +224,7 @@ module.exports = {
// get data via internal web api request
var uri = base_url + 'getnetworkhashps';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.') {
// return a blank value
@@ -260,7 +260,7 @@ module.exports = {
} else {
var uri = base_url + 'getdifficulty';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -289,7 +289,7 @@ module.exports = {
} else {
var uri = base_url + 'getconnectioncount';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -318,7 +318,7 @@ module.exports = {
} else {
var uri = base_url + 'getmasternodelist';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -347,7 +347,7 @@ module.exports = {
} else {
var uri = base_url + 'getmasternodecount';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -376,7 +376,7 @@ module.exports = {
} else {
var uri = base_url + 'getblockcount';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -405,7 +405,7 @@ module.exports = {
} else {
var uri = base_url + 'getblockhash?height=' + (height ? height : '');
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -434,7 +434,7 @@ module.exports = {
} else {
var uri = base_url + 'getblock?hash=' + hash;
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -463,7 +463,7 @@ module.exports = {
} else {
var uri = base_url + 'getrawtransaction?txid=' + hash + '&decrypt=1';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -492,7 +492,7 @@ module.exports = {
} else {
var uri = base_url + 'getmaxmoney';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -521,7 +521,7 @@ module.exports = {
} else {
var uri = base_url + 'getmaxvote';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -550,7 +550,7 @@ module.exports = {
} else {
var uri = base_url + 'getvote';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -579,7 +579,7 @@ module.exports = {
} else {
var uri = base_url + 'getphase';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -608,7 +608,7 @@ module.exports = {
} else {
var uri = base_url + 'getreward';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -637,7 +637,7 @@ module.exports = {
} else {
var uri = base_url + 'getnextrewardestimate';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -666,7 +666,7 @@ module.exports = {
} else {
var uri = base_url + 'getnextrewardwhenstr';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -698,7 +698,7 @@ module.exports = {
} else {
var uri = base_url + 'getdescriptorinfo?descriptor=' + encodeURIComponent(descriptor);
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -727,7 +727,7 @@ module.exports = {
} else {
var uri = base_url + 'deriveaddresses?descriptor=' + encodeURIComponent(descriptor);
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -835,7 +835,7 @@ module.exports = {
} else {
var uri = base_url + 'getsupply';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -863,7 +863,7 @@ module.exports = {
} else {
var uri = base_url + 'getinfo';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (!body || !body.moneysupply ||body == 'There was an error. Check your console.')
return cb(null);
@@ -896,7 +896,7 @@ module.exports = {
} else {
var uri = base_url + 'gettxoutsetinfo';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (!body || !body.total_amount ||body == 'There was an error. Check your console.')
return cb(null);
@@ -931,7 +931,7 @@ module.exports = {
} else {
var uri = base_url + 'getpeerinfo';
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -960,7 +960,7 @@ module.exports = {
} else {
var uri = base_url + 'verifymessage?address=' + address + '&signature=' + signature + '&message=' + message;
request({uri: uri, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, body) {
request({uri: uri, json: true}, function (error, response, body) {
// check if an error msg was received from the web api server
if (body == 'There was an error. Check your console.')
return cb(null);
@@ -975,7 +975,7 @@ module.exports = {
},
get_geo_location: function(address, cb) {
request({uri: 'https://reallyfreegeoip.org/json/' + address, json: true, headers: {'User-Agent': 'eiquidus'}}, function (error, response, geo) {
request({uri: 'https://reallyfreegeoip.org/json/' + address, json: true}, function (error, response, geo) {
return cb(error, geo);
});
},