* Add optional compression of the request's content
This option allows compression of the files and/or data during uploading,
Examples:
http --form --compress POST https://localhost/upload csv@./very-big.csv
http -x -x POST https://localhost/upload foo=bar
cat /var/log/system.log | http -x POST https://localhost/upload
Signed-off-by: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
* Add tests for compression
Signed-off-by: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
* Fix code style issues
Signed-off-by: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
* Fix zlib compression api missuse in Python3
Signed-off-by: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
* Remove tracing from compression logic
Signed-off-by: Aleksandr Vinokurov <aleksandr.vin@gmail.com>
Some of the tests now use the `httpbin_both` fixture from pytest-httpbin.
Also, made httpbin's CA trusted by default and added `httpbin_secure_untrusted`
fixture to allow overriding that for particular tests.
* Immediatelly convert all args from `bytes` to `str`.
* Added `Environment.stdin_encoding` and `Environment.stdout_encoding`
* Allow unicode characters in HTTP headers and basic auth credentials
by encoding them using UTF8 instead of latin1 (#212).