forked from extern/httpie-cli
v2.3.0
This commit is contained in:
parent
51bc8fb2c6
commit
1573058811
@ -6,13 +6,15 @@ This document records all notable changes to `HTTPie <https://httpie.org>`_.
|
||||
This project adheres to `Semantic Versioning <https://semver.org/>`_.
|
||||
|
||||
|
||||
`2.3.0-dev`_ (unreleased)
|
||||
`2.3.0`_ (2020-10-25)
|
||||
-------------------------
|
||||
|
||||
* Added support for streamed uploads (`#201`_).
|
||||
* Added support for multipart upload streaming (`#684`_).
|
||||
* Added support for body-from-file upload streaming (``http httpbin.org/post @file``).
|
||||
* Added ``--chunked`` to allow chunked transfer encoding.
|
||||
* Added ``--chunked`` to enable chunked transfer encoding (`#753`_).
|
||||
* Added ``--multipart`` to allow ``multipart/form-data`` encoding for non-file ``--form`` requests as well.
|
||||
* Added support for preserving field order in multipart requests (`#903`_).
|
||||
* Added ``--boundary`` to allow a custom boundary string for ``multipart/form-data`` requests.
|
||||
* Added support for combining cookies specified on the CLI and in a session file (`#932`_).
|
||||
* Added out of the box SOCKS support with no extra installation (`#904`_).
|
||||
@ -452,20 +454,23 @@ This project adheres to `Semantic Versioning <https://semver.org/>`_.
|
||||
.. _2.0.0: https://github.com/jakubroztocil/httpie/compare/1.0.3...2.0.0
|
||||
.. _2.1.0: https://github.com/jakubroztocil/httpie/compare/2.0.0...2.1.0
|
||||
.. _2.2.0: https://github.com/jakubroztocil/httpie/compare/2.1.0...2.2.0
|
||||
.. _2.3.0-dev: https://github.com/jakubroztocil/httpie/compare/2.2.0...master
|
||||
.. _2.3.0: https://github.com/jakubroztocil/httpie/compare/2.2.0...2.3.0
|
||||
|
||||
|
||||
.. _#128: https://github.com/jakubroztocil/httpie/issues/128
|
||||
.. _#201: https://github.com/jakubroztocil/httpie/issues/201
|
||||
.. _#488: https://github.com/jakubroztocil/httpie/issues/488
|
||||
.. _#668: https://github.com/jakubroztocil/httpie/issues/668
|
||||
.. _#684: https://github.com/jakubroztocil/httpie/issues/684
|
||||
.. _#718: https://github.com/jakubroztocil/httpie/issues/718
|
||||
.. _#719: https://github.com/jakubroztocil/httpie/issues/719
|
||||
.. _#753: https://github.com/jakubroztocil/httpie/issues/753
|
||||
.. _#840: https://github.com/jakubroztocil/httpie/issues/840
|
||||
.. _#853: https://github.com/jakubroztocil/httpie/issues/853
|
||||
.. _#852: https://github.com/jakubroztocil/httpie/issues/852
|
||||
.. _#870: https://github.com/jakubroztocil/httpie/issues/870
|
||||
.. _#895: https://github.com/jakubroztocil/httpie/issues/895
|
||||
.. _#903: https://github.com/jakubroztocil/httpie/issues/903
|
||||
.. _#920: https://github.com/jakubroztocil/httpie/issues/920
|
||||
.. _#904: https://github.com/jakubroztocil/httpie/issues/904
|
||||
.. _#925: https://github.com/jakubroztocil/httpie/issues/925
|
||||
|
13
Makefile
13
Makefile
@ -2,6 +2,8 @@
|
||||
# See ./CONTRIBUTING.rst
|
||||
###############################################################################
|
||||
|
||||
.PHONY: build
|
||||
|
||||
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
VERSION=$(shell grep __version__ httpie/__init__.py)
|
||||
REQUIREMENTS=requirements-dev.txt
|
||||
@ -111,6 +113,9 @@ test-bdist-wheel: clean venv
|
||||
@echo
|
||||
|
||||
|
||||
twine-check:
|
||||
twine check dist/*
|
||||
|
||||
pycodestyle:
|
||||
@echo $(H1)Running pycodestyle$(H1END)
|
||||
@[ -f $(VENV_BIN)/pycodestyle ] || $(VENV_PIP) install pycodestyle
|
||||
@ -131,6 +136,11 @@ codecov-upload:
|
||||
###############################################################################
|
||||
|
||||
|
||||
build:
|
||||
rm -rf build/
|
||||
$(VENV_PYTHON) setup.py sdist bdist_wheel
|
||||
|
||||
|
||||
publish: test-all publish-no-test
|
||||
|
||||
|
||||
@ -138,7 +148,8 @@ publish-no-test:
|
||||
@echo $(H1)Testing wheel build an installation$(H1END)
|
||||
@echo "$(VERSION)"
|
||||
@echo "$(VERSION)" | grep -q "dev" && echo '!!!Not publishing dev version!!!' && exit 1 || echo ok
|
||||
$(VENV_PYTHON) setup.py sdist bdist_wheel
|
||||
make build
|
||||
make twine-check
|
||||
$(VENV_BIN)/twine upload dist/*
|
||||
@echo
|
||||
|
||||
|
@ -538,6 +538,7 @@ Simple example:
|
||||
$ http PUT httpbin.org/put name=John email=john@example.org
|
||||
|
||||
.. code-block:: http
|
||||
|
||||
PUT / HTTP/1.1
|
||||
Accept: application/json, */*;q=0.5
|
||||
Accept-Encoding: gzip, deflate
|
||||
|
@ -3,6 +3,6 @@ HTTPie: command-line HTTP client for the API era.
|
||||
|
||||
"""
|
||||
|
||||
__version__ = '2.3.0-dev'
|
||||
__version__ = '2.3.0'
|
||||
__author__ = 'Jakub Roztocil'
|
||||
__licence__ = 'BSD'
|
||||
|
@ -159,7 +159,7 @@ def program(
|
||||
|
||||
def maybe_separate():
|
||||
nonlocal needs_separator
|
||||
if env.stdout.isatty() and needs_separator:
|
||||
if env.stdout_isatty and needs_separator:
|
||||
needs_separator = False
|
||||
getattr(env.stdout, 'buffer', env.stdout).write(b'\n\n')
|
||||
|
||||
|
13
setup.py
13
setup.py
@ -18,8 +18,10 @@ class PyTest(TestCommand):
|
||||
def finalize_options(self):
|
||||
TestCommand.finalize_options(self)
|
||||
self.test_args = [
|
||||
'--doctest-modules', '--verbose',
|
||||
'./httpie', './tests'
|
||||
'--doctest-modules',
|
||||
'--verbose',
|
||||
'./httpie',
|
||||
'./tests',
|
||||
]
|
||||
self.test_suite = True
|
||||
|
||||
@ -71,8 +73,9 @@ setup(
|
||||
version=httpie.__version__,
|
||||
description=httpie.__doc__.strip(),
|
||||
long_description=long_description(),
|
||||
long_description_content_type='text/x-rst',
|
||||
url='https://httpie.org/',
|
||||
download_url=f'https://github.com/jakubroztocil/httpie/archive/{httpie.__version__}.tar.gz',
|
||||
download_url=f'https://github.com/httpie/httpie/archive/{httpie.__version__}.tar.gz',
|
||||
author=httpie.__author__,
|
||||
author_email='jakub@roztocil.co',
|
||||
license=httpie.__licence__,
|
||||
@ -104,10 +107,10 @@ setup(
|
||||
'Topic :: Utilities'
|
||||
],
|
||||
project_urls={
|
||||
'GitHub': 'https://github.com/httpie/httpie',
|
||||
'Twitter': 'https://twitter.com/httpie',
|
||||
'Documentation': 'https://httpie.org/docs',
|
||||
'Source': 'https://github.com/jakubroztocil/httpie',
|
||||
'Online Demo': 'https://httpie.org/run',
|
||||
'Donate': 'https://httpie.org/donate',
|
||||
'Twitter': 'https://twitter.com/httpie',
|
||||
},
|
||||
)
|
||||
|
@ -52,6 +52,23 @@ def test_chunked_stdin():
|
||||
assert r.count(FILE_CONTENT) == 2
|
||||
|
||||
|
||||
def test_chunked_stdin_multiple_chunks():
|
||||
stdin_bytes = FILE_PATH.read_bytes() + b'\n' + FILE_PATH.read_bytes()
|
||||
r = http(
|
||||
'--verbose',
|
||||
'--chunked',
|
||||
HTTPBIN_WITH_CHUNKED_SUPPORT + '/post',
|
||||
env=MockEnvironment(
|
||||
stdin=StdinBytesIO(stdin_bytes),
|
||||
stdin_isatty=False,
|
||||
stdout_isatty=True,
|
||||
)
|
||||
)
|
||||
assert HTTP_OK in r
|
||||
assert 'Transfer-Encoding: chunked' in r
|
||||
assert r.count(FILE_CONTENT) == 4
|
||||
|
||||
|
||||
class TestMultipartFormDataFileUpload:
|
||||
|
||||
def test_non_existent_file_raises_parse_error(self, httpbin):
|
||||
|
Loading…
Reference in New Issue
Block a user