Skip to content

Commit fd41509

Browse files
Joy ChangJoy Chang
Joy Chang
authored and
Joy Chang
committed
fix: allow users to debug axios traffic
1 parent 11fdbd8 commit fd41509

File tree

4 files changed

+183
-51
lines changed

4 files changed

+183
-51
lines changed

lib/requestwrapper.ts

+5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ const globalTransactionId = 'x-global-transaction-id';
3434
axios.defaults.headers[method]['Content-Type'] = 'application/json';
3535
});
3636

37+
// allow user to debug axios
38+
if (process.env.NODE_DEBUG === 'axios') {
39+
require('axios-debug')(axios); // tslint:disable-line:no-var-requires
40+
}
41+
3742
/**
3843
* @private
3944
* @param {string} path

package-lock.json

+167-49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"jest": "^24.6.0",
4444
"object.assign": "~4.1.0",
4545
"prettier": "~1.13.5",
46-
"semantic-release": "^15.13.12",
46+
"semantic-release": "^15.13.13",
4747
"tslint": "~5.10.0",
4848
"tslint-config-prettier": "~1.13.0",
4949
"tslint-eslint-rules": "~5.3.1",
@@ -56,6 +56,7 @@
5656
"@types/is-stream": "~1.1.0",
5757
"@types/node": "~10.3.5",
5858
"axios": "^0.18.0",
59+
"axios-debug": "0.0.4",
5960
"dotenv": "^6.2.0",
6061
"extend": "~3.0.2",
6162
"file-type": "^7.7.1",

0 commit comments

Comments
 (0)