I am trying to consume a soap api using node soap. My response cannot be parsed and I wonder how to see the request and response data to console to ease the error finding process.
Asked
Active
Viewed 3,885 times
2 Answers
3
As node soap uses the request library, one can debug it via:
NODE_DEBUG=request node src/index.js
as pointed out request's Readme.md:
Debugging
There are at least three ways to debug the operation of
request
:
Launch the node process like
NODE_DEBUG=request node script.js
(lib,request,otherlib
works too).Set
require('request').debug = true
at any time (this does the same thing as #1).Use the request-debug module to view request and response headers and bodies.

k0pernikus
- 60,309
- 67
- 216
- 347