patroqueeet/pybloomfire — pull request #1 by isolationism (2013-01-22 03:53:21+00:00)
Title: Autodetection, use of server proxy for outbound communication to Bloomfire

Please see and merge my attached commit; it is required for us to be able to access the Bloomfire API from within Sendside's servers. They do not have direct access to the internet and must make requests through an HTTP proxy.

N.B. this design assumes you have the environment variable, `https_proxy`, defined; according to the urllib2 documentation, [`urllib2.ProxyHandler()`](http://docs.python.org/2/library/urllib2.html#urllib2.ProxyHandler) will detect proxy servers via environment variables:

> The default is to read the list of proxies from the environment variables `_proxy`.

This means the documentation should probably be updated to reflect this requirement; since bloomfire is only ever accessed via https, the environment variable `https_proxy` is critical for proxy detection to work as-written.