You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @omidn I see no reason why it shouldn't. Technically, Request-Promise is just calling Request with passing a callback.
Please compare your two implementations if they are identical and if they use the same Request version. If you can't spot anything what is the error you get in the Request-Promise version?
I use request-promise@3.0.0 and passing proxy key-value to the options object of the request works for me, i.e:
request.post({
proxy: 'localhost:port',
url: "yourUrl",
...etc
} )
Reacted by Philipp Kretzschmar, Standaa, Alec Brunelle, Beibei Li, Christoph Califice, Jirapan, Kateryna Didenko, jwelch-mindgrub, Daniel Hernández, Renan Kaic Lopes and 3 more
I'm getting 500 internal error with all above solutions! on postman and the console return error
Error: tunneling socket could not be established, cause=read ECONNRESET +17663ms
RequestError: Error: tunneling socket could not be established, cause=read ECONNRESET
at new RequestError (/Volumes/Partion-2/Projects/cars-blog/node_modules/request-promise-core/lib/errors.js:14:15)
at Request.plumbing.callback (/Volumes/Partion-2/Projects/cars-blog/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback [as _callback] (/Volumes/Partion-2/Projects/cars-blog/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/Volumes/Partion-2/Projects/cars-blog/node_modules/request/request.js:185:22)
at Request.emit (events.js:189:13)
at Request.onRequestError (/Volumes/Partion-2/Projects/cars-blog/node_modules/request/request.js:881:8)
at ClientRequest.emit (events.js:189:13)
at ClientRequest.onError (/Volumes/Partion-2/Projects/cars-blog/node_modules/tunnel-agent/index.js:179:21)
at Object.onceWrapper (events.js:277:13)
at ClientRequest.emit (events.js:189:13)
at Socket.socketErrorListener (_http_client.js:392:9)
at Socket.emit (events.js:189:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
Activity
analog-nico commentedon Jun 20, 2016
Hi @omidn I see no reason why it shouldn't. Technically, Request-Promise is just calling Request with passing a callback.
Please compare your two implementations if they are identical and if they use the same Request version. If you can't spot anything what is the error you get in the Request-Promise version?
analog-nico commentedon Jul 9, 2016
Did you find something out worth sharing @omidn ?
omidn commentedon Jul 12, 2016
@analog-nico I'm afraid not yet. I'll try to dig more and find it out.
Ennelya commentedon Jul 21, 2016
I use request-promise@3.0.0 and passing proxy key-value to the options object of the request works for me, i.e:
request.post({
proxy: 'localhost:port',
url: "yourUrl",
...etc
} )
RomanBON commentedon Nov 23, 2016
Hello, people! Someone solved this problem?
bannerchi commentedon Dec 16, 2016
@RomanBON try like this :
requst issues here
k0pernikus commentedon Jun 27, 2017
@bannerchi Thank you for pointing this out and I can confirm your approach is working
I had a very hard time configuring the proxy using request/request-promise library as I expected to be able to set it via the requestOptions like:
which produced connection refused errors.
heshaShawky commentedon Jan 9, 2020
I'm getting 500 internal error with all above solutions! on postman and the console return error
Error: tunneling socket could not be established, cause=read ECONNRESET +17663ms RequestError: Error: tunneling socket could not be established, cause=read ECONNRESET at new RequestError (/Volumes/Partion-2/Projects/cars-blog/node_modules/request-promise-core/lib/errors.js:14:15) at Request.plumbing.callback (/Volumes/Partion-2/Projects/cars-blog/node_modules/request-promise-core/lib/plumbing.js:87:29) at Request.RP$callback [as _callback] (/Volumes/Partion-2/Projects/cars-blog/node_modules/request-promise-core/lib/plumbing.js:46:31) at self.callback (/Volumes/Partion-2/Projects/cars-blog/node_modules/request/request.js:185:22) at Request.emit (events.js:189:13) at Request.onRequestError (/Volumes/Partion-2/Projects/cars-blog/node_modules/request/request.js:881:8) at ClientRequest.emit (events.js:189:13) at ClientRequest.onError (/Volumes/Partion-2/Projects/cars-blog/node_modules/tunnel-agent/index.js:179:21) at Object.onceWrapper (events.js:277:13) at ClientRequest.emit (events.js:189:13) at Socket.socketErrorListener (_http_client.js:392:9) at Socket.emit (events.js:189:13) at emitErrorNT (internal/streams/destroy.js:82:8) at emitErrorAndCloseNT (internal/streams/destroy.js:50:3) at process._tickCallback (internal/process/next_tick.js:63:19)