mirror of
https://github.com/httpie/cli.git
synced 2025-06-26 20:41:49 +02:00
v2.0.0
This commit is contained in:
parent
e4a3ce8b9d
commit
4b524e6a8c
@ -6,7 +6,7 @@ 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.0.0-dev`_ (unreleased)
|
`2.0.0`_ (2020-01-12)
|
||||||
-------------------------
|
-------------------------
|
||||||
* Removed Python 2.7 support (`EOL Jan 2020 <https://www.python.org/doc/sunset-python-2/>`_).
|
* Removed Python 2.7 support (`EOL Jan 2020 <https://www.python.org/doc/sunset-python-2/>`_).
|
||||||
* Removed the default 30-second connection ``--timeout`` limit.
|
* Removed the default 30-second connection ``--timeout`` limit.
|
||||||
@ -408,4 +408,5 @@ This project adheres to `Semantic Versioning <https://semver.org/>`_.
|
|||||||
.. _1.0.1: https://github.com/jakubroztocil/httpie/compare/1.0.0...1.0.1
|
.. _1.0.1: https://github.com/jakubroztocil/httpie/compare/1.0.0...1.0.1
|
||||||
.. _1.0.2: https://github.com/jakubroztocil/httpie/compare/1.0.1...1.0.2
|
.. _1.0.2: https://github.com/jakubroztocil/httpie/compare/1.0.1...1.0.2
|
||||||
.. _1.0.3: https://github.com/jakubroztocil/httpie/compare/1.0.2...1.0.3
|
.. _1.0.3: https://github.com/jakubroztocil/httpie/compare/1.0.2...1.0.3
|
||||||
.. _2.0.0-dev: https://github.com/jakubroztocil/httpie/compare/1.0.3...master
|
.. _2.0.0-dev: https://github.com/jakubroztocil/httpie/compare/1.0.3...2.0.0
|
||||||
|
.. _2.1.0-dev: https://github.com/jakubroztocil/httpie/compare/2.0.0...master
|
||||||
|
2
Makefile
2
Makefile
@ -36,7 +36,7 @@ install: venv
|
|||||||
clean:
|
clean:
|
||||||
@echo $(H1)Cleaning up$(H1END)
|
@echo $(H1)Cleaning up$(H1END)
|
||||||
rm -rf $(VENV_ROOT)
|
rm -rf $(VENV_ROOT)
|
||||||
# Symlink for virtualenvwrapper, if we’ve created one.
|
# Remove symlink for virtualenvwrapper, if we’ve created one.
|
||||||
[ -n "$(WORKON_HOME)" -a -L "$(WORKON_HOME)/httpie" -a -f "$(WORKON_HOME)/httpie" ] && rm $(WORKON_HOME)/httpie || true
|
[ -n "$(WORKON_HOME)" -a -L "$(WORKON_HOME)/httpie" -a -f "$(WORKON_HOME)/httpie" ] && rm $(WORKON_HOME)/httpie || true
|
||||||
rm -rf .tox *.egg dist build .coverage .cache .pytest_cache httpie.egg-info
|
rm -rf .tox *.egg dist build .coverage .cache .pytest_cache httpie.egg-info
|
||||||
find . -name '__pycache__' -delete -o -name '*.pyc' -delete
|
find . -name '__pycache__' -delete -o -name '*.pyc' -delete
|
||||||
|
@ -3,6 +3,6 @@ HTTPie - a CLI, cURL-like tool for humans.
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = '2.0.0-dev'
|
__version__ = '2.0.0'
|
||||||
__author__ = 'Jakub Roztocil'
|
__author__ = 'Jakub Roztocil'
|
||||||
__licence__ = 'BSD'
|
__licence__ = 'BSD'
|
||||||
|
@ -18,21 +18,19 @@ from httpie.utils import (get_content_type, load_json_preserve_order)
|
|||||||
|
|
||||||
class RequestItems:
|
class RequestItems:
|
||||||
|
|
||||||
def __init__(self, as_form=False, chunked=False):
|
def __init__(self, as_form=False):
|
||||||
self.headers = RequestHeadersDict()
|
self.headers = RequestHeadersDict()
|
||||||
self.data = RequestDataDict() if as_form else RequestJSONDataDict()
|
self.data = RequestDataDict() if as_form else RequestJSONDataDict()
|
||||||
self.files = RequestFilesDict()
|
self.files = RequestFilesDict()
|
||||||
self.params = RequestQueryParamsDict()
|
self.params = RequestQueryParamsDict()
|
||||||
self.chunked = chunked
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def from_args(
|
def from_args(
|
||||||
cls,
|
cls,
|
||||||
request_item_args: List[KeyValueArg],
|
request_item_args: List[KeyValueArg],
|
||||||
as_form=False,
|
as_form=False,
|
||||||
chunked=False
|
|
||||||
) -> 'RequestItems':
|
) -> 'RequestItems':
|
||||||
instance = cls(as_form=as_form, chunked=chunked)
|
instance = cls(as_form=as_form)
|
||||||
rules: Dict[str, Tuple[Callable, dict]] = {
|
rules: Dict[str, Tuple[Callable, dict]] = {
|
||||||
SEPARATOR_HEADER: (
|
SEPARATOR_HEADER: (
|
||||||
process_header_arg,
|
process_header_arg,
|
||||||
@ -110,15 +108,6 @@ def process_file_upload_arg(arg: KeyValueArg) -> Tuple[str, IO, str]:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def parse_file_item_chunked(arg: KeyValueArg):
|
|
||||||
fn = arg.value
|
|
||||||
try:
|
|
||||||
f = open(os.path.expanduser(fn), 'rb')
|
|
||||||
except IOError as e:
|
|
||||||
raise ParseError('"%s": %s' % (arg.orig, e))
|
|
||||||
return os.path.basename(fn), f, get_content_type(fn)
|
|
||||||
|
|
||||||
|
|
||||||
def process_data_item_arg(arg: KeyValueArg) -> str:
|
def process_data_item_arg(arg: KeyValueArg) -> str:
|
||||||
return arg.value
|
return arg.value
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user