Open nfriedly opened 7 years ago
Per https://github.com/watson-developer-cloud/node-sdk/issues/421#issuecomment-287428644, it sounds like just switching in request
for http
/https
will work.
I implemented nifriedly's idea on my branch. It works via proxy. If there isn't any reason to use http or https module instead of request module, I want to send a pull request after adding the tests and formating the code.
Please do @yatszhash. Always useful and welcomed.
I think the best approach would be to make the request back end pluggable, allowing the user to provide their own instance of http
, https
, request
or axios
.
Also, the maintainers of request
seem to prefer that we stop using it, although this may be interpreted differently: https://github.com/request/request/issues/3142
There doesn't appear to be any way to use
solr-client
with the connection tunneled through a http proxy, which would be a helpful feature for some users.I notice that it uses
request
for one or two connections, but Node's built-inhttp
library for the majority of things.request
has built-in proxy support (and it can even be configured with environment properties) - so enabling proxy support might be fairly simple.Is this a feasible change, either through
request
or some other method?This is related to https://github.com/watson-developer-cloud/node-sdk/issues/421