Charca / bootbot

Facebook Messenger Bot Framework for Node.js
MIT License
974 stars 253 forks source link

Setting proxy #74

Open kelkmere opened 6 years ago

kelkmere commented 6 years ago

Hi, I am using this library behind a corporate firewall. Any external request would require first passing through a proxy. For the request library, I can do so by setting the HTTPS_PROXY environment variable. However I am not too familiar with the node-fetch library.

Charca commented 6 years ago

I think we can do this by leveraging a library like http-proxy-agent and use it like in the example here: https://github.com/bitinn/node-fetch/issues/79

But we'll need to add support through an environment variable and/or an option in the BootBot class constructor.