Skip to content
This repository was archived by the owner on Jun 6, 2023. It is now read-only.

Commit 6902231

Browse files
dteexdx
authored andcommitted
feat: add new headers to all requests
1 parent 70780b2 commit 6902231

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/client.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
var configInfo = require('./config');
44
var request = require('./request');
5+
var clientName = require('../package.json').name;
6+
var clientVersion = require('../package.json').version;
57

68
// for credential caching
79
var projectConfig = require('./projectConfig');
@@ -29,6 +31,9 @@ function client(method, path, inputs, headers, file, cb) {
2931
// It's assumed these will be provided, but just in case...
3032
if (!headers) headers = {};
3133

34+
headers.ps_client_name = clientName;
35+
headers.ps_client_version = clientVersion;
36+
3237
// Send input params as the query string if this is a GET, otherwise send
3338
// with the HTTP request body
3439
switch (method.toLowerCase()) {

0 commit comments

Comments
 (0)