Open chrisdlangton opened 4 years ago
This repo uses urllib
but it does not expose its interfaces for adding request handlers: https://github.com/sendgrid/python-http-client/blob/5404e1523384d0aab51e841ae56759aab03d3a9e/python_http_client/client.py#L259-L264
I think adding a proxies
arg to def http_request
which would just be passed to a new ProxyHandler that's passed to the opener would work. Then the interface would look similar to that of requests
. This would not handle the env vars use case, but that may not be difficult.
This issue has been added to our internal backlog to be prioritized. Pull requests and +1s on the issue summary will help it move up the backlog.
I cannot use send grid to send email from a webserver that is in a private subnet.
The webserver is behind a load balancer for ingress and requires a proxy (allowed hosts list) for egress.
This workload must be compliant, so best practices in security are required. This network topology is baseline standard (but more commonly users will leave everything ooen and exposed) for the basics to meet compliance for CIS, PCI, IRAP, ISM, SOC2, ISO27018
This lib can be removed as redundant from my observation. I suggest sendgrid use
urllib
to do HTTP instead of reinvent the wheel. if you need more features userequests
instead of reinvent the aircraft. Both of these options allow a per-request proxy setting AND most importantly they both respect the operating system proxy setting (on linux it is the env varhttp_proxy
andhttps_proxy
case insensitive).I would appreciate some attention on this. thank you