I am currently using request-promise as my HTTP request client 'request', however I am getting this error for some reason. My user agent is defined in the header, but i am still getting this error. Could anyone point me to the right direction
{ RequestError: TypeError: self.agent.addRequest is not a function
at new RequestError (/opt/mypage/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/opt/mypage/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback [as _callback] (/opt/mypage/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/opt/mypage/node_modules/request/request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:188:7)
at Request.start (/opt/mypage/node_modules/request/request.js:757:10)
at Request.end (/opt/mypage/node_modules/request/request.js:1525:10)
at end (/opt/mypage/node_modules/request/request.js:567:14)
at Immediate.<anonymous> (/opt/auth-pages/node_modules/request/request.js:581:7)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)
This is how it is being set in my project:
headers: {
'user-agent': my-page,
}
via JAY NATHAN
No comments:
Post a Comment