dvonlehman / express-request-proxy

Advanced streaming http request proxy middleware for Express with support for custom routes, caching, and response transforms.
95 stars 38 forks source link

Allow passing errorhandler to the npm request module used internally. #43

Open gautam1168 opened 5 years ago

gautam1168 commented 5 years ago

The npm 'request' module supports passing in a callback function that is called after the request is completed with the result or the error. There is no way to pass this callback/handler currently. This is required because making a call to an non-existent url using express-request-proxy throws an error that cannot be caught by the caller program. I have made a PR to add this: https://github.com/dvonlehman/express-request-proxy/pull/42