You've already forked httpie-cli
							
							
				mirror of
				https://github.com/httpie/cli.git
				synced 2025-10-30 23:47:52 +02:00 
			
		
		
		
	v2.3.0
This commit is contained in:
		| @@ -6,13 +6,15 @@ This document records all notable changes to `HTTPie <https://httpie.org>`_. | |||||||
| This project adheres to `Semantic Versioning <https://semver.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 multipart upload streaming (`#684`_). | ||||||
| * Added support for body-from-file upload streaming (``http httpbin.org/post @file``). | * 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 ``--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 ``--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 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`_). | * 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.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.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.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 | .. _#128: https://github.com/jakubroztocil/httpie/issues/128 | ||||||
|  | .. _#201: https://github.com/jakubroztocil/httpie/issues/201 | ||||||
| .. _#488: https://github.com/jakubroztocil/httpie/issues/488 | .. _#488: https://github.com/jakubroztocil/httpie/issues/488 | ||||||
| .. _#668: https://github.com/jakubroztocil/httpie/issues/668 | .. _#668: https://github.com/jakubroztocil/httpie/issues/668 | ||||||
| .. _#684: https://github.com/jakubroztocil/httpie/issues/684 | .. _#684: https://github.com/jakubroztocil/httpie/issues/684 | ||||||
| .. _#718: https://github.com/jakubroztocil/httpie/issues/718 | .. _#718: https://github.com/jakubroztocil/httpie/issues/718 | ||||||
| .. _#719: https://github.com/jakubroztocil/httpie/issues/719 | .. _#719: https://github.com/jakubroztocil/httpie/issues/719 | ||||||
|  | .. _#753: https://github.com/jakubroztocil/httpie/issues/753 | ||||||
| .. _#840: https://github.com/jakubroztocil/httpie/issues/840 | .. _#840: https://github.com/jakubroztocil/httpie/issues/840 | ||||||
| .. _#853: https://github.com/jakubroztocil/httpie/issues/853 | .. _#853: https://github.com/jakubroztocil/httpie/issues/853 | ||||||
| .. _#852: https://github.com/jakubroztocil/httpie/issues/852 | .. _#852: https://github.com/jakubroztocil/httpie/issues/852 | ||||||
| .. _#870: https://github.com/jakubroztocil/httpie/issues/870 | .. _#870: https://github.com/jakubroztocil/httpie/issues/870 | ||||||
| .. _#895: https://github.com/jakubroztocil/httpie/issues/895 | .. _#895: https://github.com/jakubroztocil/httpie/issues/895 | ||||||
|  | .. _#903: https://github.com/jakubroztocil/httpie/issues/903 | ||||||
| .. _#920: https://github.com/jakubroztocil/httpie/issues/920 | .. _#920: https://github.com/jakubroztocil/httpie/issues/920 | ||||||
| .. _#904: https://github.com/jakubroztocil/httpie/issues/904 | .. _#904: https://github.com/jakubroztocil/httpie/issues/904 | ||||||
| .. _#925: https://github.com/jakubroztocil/httpie/issues/925 | .. _#925: https://github.com/jakubroztocil/httpie/issues/925 | ||||||
|   | |||||||
							
								
								
									
										13
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								Makefile
									
									
									
									
									
								
							| @@ -2,6 +2,8 @@ | |||||||
| # See ./CONTRIBUTING.rst | # See ./CONTRIBUTING.rst | ||||||
| ############################################################################### | ############################################################################### | ||||||
|  |  | ||||||
|  | .PHONY: build | ||||||
|  |  | ||||||
| ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) | ||||||
| VERSION=$(shell grep __version__ httpie/__init__.py) | VERSION=$(shell grep __version__ httpie/__init__.py) | ||||||
| REQUIREMENTS=requirements-dev.txt | REQUIREMENTS=requirements-dev.txt | ||||||
| @@ -111,6 +113,9 @@ test-bdist-wheel: clean venv | |||||||
| 	@echo | 	@echo | ||||||
|  |  | ||||||
|  |  | ||||||
|  | twine-check: | ||||||
|  | 	twine check dist/* | ||||||
|  |  | ||||||
| pycodestyle: | pycodestyle: | ||||||
| 	@echo $(H1)Running pycodestyle$(H1END) | 	@echo $(H1)Running pycodestyle$(H1END) | ||||||
| 	@[ -f $(VENV_BIN)/pycodestyle ] || $(VENV_PIP) install pycodestyle | 	@[ -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 | publish: test-all publish-no-test | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -138,7 +148,8 @@ publish-no-test: | |||||||
| 	@echo $(H1)Testing wheel build an installation$(H1END) | 	@echo $(H1)Testing wheel build an installation$(H1END) | ||||||
| 	@echo "$(VERSION)" | 	@echo "$(VERSION)" | ||||||
| 	@echo "$(VERSION)" | grep -q "dev" && echo '!!!Not publishing dev version!!!' && exit 1 || echo ok | 	@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/* | 	$(VENV_BIN)/twine upload dist/* | ||||||
| 	@echo | 	@echo | ||||||
|  |  | ||||||
|   | |||||||
| @@ -538,6 +538,7 @@ Simple example: | |||||||
|     $ http PUT httpbin.org/put name=John email=john@example.org |     $ http PUT httpbin.org/put name=John email=john@example.org | ||||||
|  |  | ||||||
| .. code-block:: http | .. code-block:: http | ||||||
|  |  | ||||||
|     PUT / HTTP/1.1 |     PUT / HTTP/1.1 | ||||||
|     Accept: application/json, */*;q=0.5 |     Accept: application/json, */*;q=0.5 | ||||||
|     Accept-Encoding: gzip, deflate |     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' | __author__ = 'Jakub Roztocil' | ||||||
| __licence__ = 'BSD' | __licence__ = 'BSD' | ||||||
|   | |||||||
| @@ -159,7 +159,7 @@ def program( | |||||||
|  |  | ||||||
|         def maybe_separate(): |         def maybe_separate(): | ||||||
|             nonlocal needs_separator |             nonlocal needs_separator | ||||||
|             if env.stdout.isatty() and needs_separator: |             if env.stdout_isatty and needs_separator: | ||||||
|                 needs_separator = False |                 needs_separator = False | ||||||
|                 getattr(env.stdout, 'buffer', env.stdout).write(b'\n\n') |                 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): |     def finalize_options(self): | ||||||
|         TestCommand.finalize_options(self) |         TestCommand.finalize_options(self) | ||||||
|         self.test_args = [ |         self.test_args = [ | ||||||
|             '--doctest-modules', '--verbose', |             '--doctest-modules', | ||||||
|             './httpie', './tests' |             '--verbose', | ||||||
|  |             './httpie', | ||||||
|  |             './tests', | ||||||
|         ] |         ] | ||||||
|         self.test_suite = True |         self.test_suite = True | ||||||
|  |  | ||||||
| @@ -71,8 +73,9 @@ setup( | |||||||
|     version=httpie.__version__, |     version=httpie.__version__, | ||||||
|     description=httpie.__doc__.strip(), |     description=httpie.__doc__.strip(), | ||||||
|     long_description=long_description(), |     long_description=long_description(), | ||||||
|  |     long_description_content_type='text/x-rst', | ||||||
|     url='https://httpie.org/', |     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=httpie.__author__, | ||||||
|     author_email='jakub@roztocil.co', |     author_email='jakub@roztocil.co', | ||||||
|     license=httpie.__licence__, |     license=httpie.__licence__, | ||||||
| @@ -104,10 +107,10 @@ setup( | |||||||
|         'Topic :: Utilities' |         'Topic :: Utilities' | ||||||
|     ], |     ], | ||||||
|     project_urls={ |     project_urls={ | ||||||
|  |         'GitHub': 'https://github.com/httpie/httpie', | ||||||
|  |         'Twitter': 'https://twitter.com/httpie', | ||||||
|         'Documentation': 'https://httpie.org/docs', |         'Documentation': 'https://httpie.org/docs', | ||||||
|         'Source': 'https://github.com/jakubroztocil/httpie', |  | ||||||
|         'Online Demo': 'https://httpie.org/run', |         'Online Demo': 'https://httpie.org/run', | ||||||
|         'Donate': 'https://httpie.org/donate', |         'Donate': 'https://httpie.org/donate', | ||||||
|         'Twitter': 'https://twitter.com/httpie', |  | ||||||
|     }, |     }, | ||||||
| ) | ) | ||||||
|   | |||||||
| @@ -52,6 +52,23 @@ def test_chunked_stdin(): | |||||||
|     assert r.count(FILE_CONTENT) == 2 |     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: | class TestMultipartFormDataFileUpload: | ||||||
|  |  | ||||||
|     def test_non_existent_file_raises_parse_error(self, httpbin): |     def test_non_existent_file_raises_parse_error(self, httpbin): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user