* 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>
* Update brew formula for 1.0.3
This updates the Homebrew formula to:
* Install httpie 1.0.3
* Install the most up-to-date dependencies for httpie
* Add myself to AUTHORS
Some JSON based formats like JSON Home Documents[1] don't
use a '+json' suffix, but simply contain json in their
MIME type. Also, some servers might use (outdated)
types like 'application/x-json'.
The JSON formatter can already handle those cases,
but the highlighter was ignoring them.
This commit will let the highlighter choose the JSON
lexer if no other lexer could be found and the MIME subtype
contains 'json'
[1] http://tools.ietf.org/html/draft-nottingham-json-home-03