@@ -3289,6 +3289,7 @@ module.exports = utils;
3289
3289
(function() {
3290
3290
var Http = require('../../http');
3291
3291
var utils = require('../../utils');
3292
+ var SDK_VERSION = require('../../../package.json').version;
3292
3293
3293
3294
var root = exports || this;
3294
3295
@@ -3311,6 +3312,7 @@ module.exports = utils;
3311
3312
},
3312
3313
3313
3314
makeRequest: function(url, message, callback) {
3315
+ message.headers["Splunk-Client"] = "splunk-sdk-javascript/" + SDK_VERSION;
3314
3316
var that = this;
3315
3317
var params = {
3316
3318
url: url,
@@ -3354,7 +3356,7 @@ module.exports = utils;
3354
3356
}
3355
3357
});
3356
3358
})();
3357
- },{"../../http":7,"../../utils":25}],22:[function(require,module,exports){
3359
+ },{"../../../package.json":280,"../../ http":7,"../../utils":25}],22:[function(require,module,exports){
3358
3360
3359
3361
// Copyright 2011 Splunk, Inc.
3360
3362
//
@@ -3373,6 +3375,7 @@ module.exports = utils;
3373
3375
(function() {
3374
3376
var Http = require('../../http');
3375
3377
var utils = require('../../utils');
3378
+ var SDK_VERSION = require('../../../package.json').version;
3376
3379
3377
3380
var root = exports || this;
3378
3381
@@ -3442,6 +3445,7 @@ module.exports = utils;
3442
3445
// as some proxy implementations would rather
3443
3446
// use this.
3444
3447
message.headers["X-ProxyDestination"] = url;
3448
+ message.headers["Splunk-Client"] = "splunk-sdk-javascript/" + SDK_VERSION;
3445
3449
3446
3450
// Need to remove the hostname from the URL
3447
3451
var parsed = parseUri(url);
@@ -3517,7 +3521,7 @@ module.exports = utils;
3517
3521
}
3518
3522
});
3519
3523
})();
3520
- },{"../../http":7,"../../utils":25}],23:[function(require,module,exports){
3524
+ },{"../../../package.json":280,"../../ http":7,"../../utils":25}],23:[function(require,module,exports){
3521
3525
(function (Buffer){(function (){
3522
3526
3523
3527
// Copyright 2011 Splunk, Inc.
@@ -3538,6 +3542,7 @@ module.exports = utils;
3538
3542
var needle = require('needle');
3539
3543
var Http = require('../../http');
3540
3544
var utils = require('../../utils');
3545
+ var SDK_VERSION = require('../../../package.json').version;
3541
3546
3542
3547
var root = exports || this;
3543
3548
@@ -3561,6 +3566,7 @@ module.exports = utils;
3561
3566
3562
3567
// Get the byte-length of the content, which adjusts for multi-byte characters
3563
3568
request_options.headers["Content-Length"] = Buffer.byteLength(request_options.body, "utf8");
3569
+ request_options.headers["User-Agent"] = "splunk-sdk-javascript/" + SDK_VERSION;
3564
3570
3565
3571
if(message.query && ["xml", "csv"].includes(message.query.output_mode)){
3566
3572
request_options.parse_response = false;
@@ -3621,6 +3627,7 @@ module.exports = utils;
3621
3627
3622
3628
// Get the byte-length of the content, which adjusts for multi-byte characters
3623
3629
request_options.headers["Content-Length"] = Buffer.byteLength(request_options.body, "utf8");
3630
+ request_options.headers["User-Agent"] = "splunk-sdk-javascript/" + SDK_VERSION;
3624
3631
3625
3632
var that = this;
3626
3633
var response = needle(request_options.method, request_options.url, request_options.body, request_options);
@@ -3635,7 +3642,7 @@ module.exports = utils;
3635
3642
})();
3636
3643
3637
3644
}).call(this)}).call(this,require("buffer").Buffer)
3638
- },{"../../http":7,"../../utils":25,"buffer":81,"needle":195}],24:[function(require,module,exports){
3645
+ },{"../../../package.json":280,"../../ http":7,"../../utils":25,"buffer":81,"needle":195}],24:[function(require,module,exports){
3639
3646
/*!*/
3640
3647
// Copyright 2014 Splunk, Inc.
3641
3648
//
@@ -32404,7 +32411,7 @@ module.exports={
32404
32411
"_args": [
32405
32412
[
32406
32413
"elliptic@6.5.4",
32407
- "/Users/abhis/Documents/python /splunk-sdk-javascript"
32414
+ "/Users/abhis/Documents/GitHub /splunk-sdk-javascript"
32408
32415
]
32409
32416
],
32410
32417
"_development": true,
@@ -32430,7 +32437,7 @@ module.exports={
32430
32437
],
32431
32438
"_resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
32432
32439
"_spec": "6.5.4",
32433
- "_where": "/Users/abhis/Documents/python /splunk-sdk-javascript",
32440
+ "_where": "/Users/abhis/Documents/GitHub /splunk-sdk-javascript",
32434
32441
"author": {
32435
32442
"name": "Fedor Indutny",
32436
32443
"email": "fedor@indutny.com"
@@ -42314,7 +42321,7 @@ module.exports={
42314
42321
"_args": [
42315
42322
[
42316
42323
"needle@3.0.0",
42317
- "/Users/abhis/Documents/python /splunk-sdk-javascript"
42324
+ "/Users/abhis/Documents/GitHub /splunk-sdk-javascript"
42318
42325
]
42319
42326
],
42320
42327
"_from": "needle@3.0.0",
@@ -42338,7 +42345,7 @@ module.exports={
42338
42345
],
42339
42346
"_resolved": "https://registry.npmjs.org/needle/-/needle-3.0.0.tgz",
42340
42347
"_spec": "3.0.0",
42341
- "_where": "/Users/abhis/Documents/python /splunk-sdk-javascript",
42348
+ "_where": "/Users/abhis/Documents/GitHub /splunk-sdk-javascript",
42342
42349
"author": {
42343
42350
"name": "Tomás Pollak",
42344
42351
"email": "tomas@forkhq.com"
@@ -59715,6 +59722,60 @@ function extend() {
59715
59722
return target
59716
59723
}
59717
59724
59725
+ },{}],280:[function(require,module,exports){
59726
+ module.exports={
59727
+ "name": "splunk-sdk",
59728
+ "version": "1.11.0",
59729
+ "description": "SDK for usage with the Splunk REST API",
59730
+ "homepage": "http://dev.splunk.com",
59731
+ "main": "index.js",
59732
+ "directories": {
59733
+ "example": "examples",
59734
+ "lib": "lib",
59735
+ "test": "tests"
59736
+ },
59737
+ "repository": {
59738
+ "type": "git",
59739
+ "url": "http://github.com/splunk/splunk-sdk-javascript.git"
59740
+ },
59741
+ "keywords": [
59742
+ "splunk",
59743
+ "data",
59744
+ "search",
59745
+ "logs",
59746
+ "javascript"
59747
+ ],
59748
+ "scripts": {
59749
+ "test": "nyc mocha tests/tests.js -t 50000 --allow-uncaught --exit --reporter mochawesome"
59750
+ },
59751
+ "dependencies": {
59752
+ "cookie": "0.4.2",
59753
+ "dotenv": "16.0.0",
59754
+ "elementtree": "0.1.7",
59755
+ "needle": "3.0.0"
59756
+ },
59757
+ "devDependencies": {
59758
+ "browserify": "^17.0.0",
59759
+ "chai": "^4.3.6",
59760
+ "jshint": "2.13.4",
59761
+ "mocha": "7.2.0",
59762
+ "mochawesome": "7.1.0",
59763
+ "mustache": "4.2.0",
59764
+ "nyc": "^15.1.0",
59765
+ "readable-stream": "3.6.0",
59766
+ "uglify-js": "3.15.2"
59767
+ },
59768
+ "author": {
59769
+ "name": "Splunk",
59770
+ "email": "devinfo@splunk.com",
59771
+ "url": "http://dev.splunk.com"
59772
+ },
59773
+ "license": "Apache-2.0",
59774
+ "engine": {
59775
+ "node": ">=0.8.0"
59776
+ }
59777
+ }
59778
+
59718
59779
},{}]},{},[5]);
59719
59780
59720
59781
0 commit comments