import zlib
import mrequests as requests


host = "http://httpbin.org/"
#host = "http://localhost/"
url = host + "deflate"
r = requests.get(url, headers={"TE": "deflate"})

if r.status_code == 200:
    print("Response body length: %i" % len(r.content))
    text = zlib.decompress(r.content).decode("utf-8")
    print("Deflated response text length: %i" % len(text))
    print("Response text:\n")
    print(text)
else:
    print("Request failed. Status: {}".format(r.status_code))

r.close()

Add example script for 'deflate' transfer encoding
Add example script for 'deflate' transfer encoding

Signed-off-by: Christopher Arndt <711c73f64afdce07b7e38039a96d2224209e9a6c@chrisarndt.de>
