Adding GZip support to urllib3 (#704)

* Adding GZip support to urllib3

* Adding compression documentation and example

* Convert to lowercase for consistency

* Moving header manipulation to __init__()

* Validating headers for compression

* Moving body compression out of the headers block

* Don't compress if there is no body

* Infer true
This commit is contained in:
robgil
2018-03-13 10:34:25 -06:00
committed by Nick Lang
parent c3544296ef
commit 64c125d34c
3 changed files with 26 additions and 1 deletions
+11
View File
@@ -258,6 +258,17 @@ bodies via post::
from elasticsearch import Elasticsearch
es = Elasticsearch(send_get_body_as='POST')
Compression
~~~~~~~~~~~
When using capacity constrained networks (low throughput), it may be handy to enable
compression. This is especially useful when doing bulk loads or inserting large
documents. This will configure compression on the *request*.
::
from elasticsearch import Elasticsearch
es = Elasticsearch(hosts, http_compress = True)
Running on AWS with IAM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~