aacerox / node-rest-client

REST API client from node.js
MIT License
377 stars 132 forks source link

Conflict with "request": "^2.83.0". #178

Open droidmanspace opened 6 years ago

droidmanspace commented 6 years ago

Can you please help me to avoid this problem ? While require a js file with requires "node-rest-client" , makes the headers of another request as invalid character .

Unhandled rejection RequestError: TypeError: The header content contains invalid characters
    at new RequestError (/root/nodeserver/node_modules/request-promise-core/lib/errors.js:14:15)
    at Request.plumbing.callback (/root/nodeserver/node_modules/request-promise-core/lib/plumbing.js:87:29)
    at Request.RP$callback [as _callback] (/root/nodeserver/node_modules/request-promise-core/lib/plumbing.js:46:31)
    at self.callback (/root/nodeserver/node_modules/request/request.js:186:22)
    at emitOne (events.js:120:20)
    at Request.emit (events.js:210:7)
    at Request.start (/root/nodeserver/node_modules/request/request.js:750:10)
    at Request.write (/root/nodeserver/node_modules/request/request.js:1498:10)
    at FormData.ondata (internal/streams/legacy.js:16:26)
    at emitOne (events.js:115:13)
    at FormData.emit (events.js:210:7)
    at FormData.CombinedStream.write (/root/nodeserver/node_modules/combined-stream/lib/combined_stream.js:118:8)
    at FormData.CombinedStream._pipeNext (/root/nodeserver/node_modules/combined-stream/lib/combined_stream.js:106:8)
    at FormData.CombinedStream._getNext (/root/nodeserver/node_modules/combined-stream/lib/combined_stream.js:79:10)
    at FormData.CombinedStream.resume (/root/nodeserver/node_modules/combined-stream/lib/combined_stream.js:134:10)
    at FormData.CombinedStream.pipe (/root/nodeserver/node_modules/combined-stream/lib/combined_stream.js:64:8)
    at end (/root/nodeserver/node_modules/request/request.js:528:22)
    at FormData.<anonymous> (/root/nodeserver/node_modules/request/request.js:572:9)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Thanks