thierrylemoulec/Sublime-Csslisible — pull request #9 by pomeh (2014-01-04 13:19:12+00:00)
Title: use system-wide proxy for querying the API endpoint

Following what I've done in this pull request Sheeprider/Sublime-Csslisible#1, I've updated the code to allow the use of a system-wide proxy (using `urllib.request.ProxyHandler()`), but now this is absolutely transparent for the end user.
It uses the same API that @wbond recommands for installing Package Control at https://sublime.wbond.net/installation, and it's as simple as this:

```
url = 'http://www.youurl.com'
data = {
'key': 'value',
'key2': 'value',
# [...]
}
params = urllib.parse.urlencode(data)
params = params.encode('utf8')
urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) )
response = urllib.request.urlopen(url, params, 5).read()
```

This way, the package will work everywhere, with or without system-proxy set.