mirror of
https://github.com/httpie/cli.git
synced 2025-08-18 09:10:07 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
b54239b525 | ||
|
b0b0f3dc53 | ||
|
9f7612cdeb | ||
|
5e76ebc5e1 | ||
|
343a521673 |
2
.github/workflows/release-pypi.yml
vendored
2
.github/workflows/release-pypi.yml
vendored
@@ -22,7 +22,7 @@ jobs:
|
|||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
|
|
||||||
- name: Build a binary wheel and a source tarball
|
- name: Build a binary wheel and a source tarball
|
||||||
run: make build
|
run: make install && make build
|
||||||
|
|
||||||
- name: Release on PyPI
|
- name: Release on PyPI
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
|
@@ -3,6 +3,11 @@
|
|||||||
This document records all notable changes to [HTTPie](https://httpie.io).
|
This document records all notable changes to [HTTPie](https://httpie.io).
|
||||||
This project adheres to [Semantic Versioning](https://semver.org/).
|
This project adheres to [Semantic Versioning](https://semver.org/).
|
||||||
|
|
||||||
|
## [3.2.1](https://github.com/httpie/httpie/compare/3.1.0...3.2.1) (2022-05-06)
|
||||||
|
|
||||||
|
- Improved support for determining auto-streaming when the `Content-Type` header includes encoding information. ([#1383](https://github.com/httpie/httpie/pull/1383))
|
||||||
|
- Fixed the display of the crash happening in the secondary process for update checks. ([#1388](https://github.com/httpie/httpie/issues/1388))
|
||||||
|
|
||||||
## [3.2.0](https://github.com/httpie/httpie/compare/3.1.0...3.2.0) (2022-05-05)
|
## [3.2.0](https://github.com/httpie/httpie/compare/3.1.0...3.2.0) (2022-05-05)
|
||||||
|
|
||||||
- Added a warning for notifying the user about the new updates. ([#1336](https://github.com/httpie/httpie/pull/1336))
|
- Added a warning for notifying the user about the new updates. ([#1336](https://github.com/httpie/httpie/pull/1336))
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
.\" This file is auto-generated from the parser declaration in httpie/cli/definition.py by extras/scripts/generate_man_pages.py.
|
.\" This file is auto-generated from the parser declaration in httpie/cli/definition.py by extras/scripts/generate_man_pages.py.
|
||||||
.TH http 1 "2022-05-05" "HTTPie 3.2.0" "HTTPie Manual"
|
.TH http 1 "2022-05-06" "HTTPie 3.2.1" "HTTPie Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
http
|
http
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
.\" This file is auto-generated from the parser declaration in httpie/manager/cli.py by extras/scripts/generate_man_pages.py.
|
.\" This file is auto-generated from the parser declaration in httpie/manager/cli.py by extras/scripts/generate_man_pages.py.
|
||||||
.TH httpie 1 "2022-05-05" "HTTPie 3.2.0" "HTTPie Manual"
|
.TH httpie 1 "2022-05-06" "HTTPie 3.2.1" "HTTPie Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
httpie
|
httpie
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
.\" This file is auto-generated from the parser declaration in httpie/cli/definition.py by extras/scripts/generate_man_pages.py.
|
.\" This file is auto-generated from the parser declaration in httpie/cli/definition.py by extras/scripts/generate_man_pages.py.
|
||||||
.TH https 1 "2022-05-05" "HTTPie 3.2.0" "HTTPie Manual"
|
.TH https 1 "2022-05-06" "HTTPie 3.2.1" "HTTPie Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
https
|
https
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@@ -3,7 +3,7 @@ HTTPie: modern, user-friendly command-line HTTP client for the API era.
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = '3.2.0'
|
__version__ = '3.2.1'
|
||||||
__date__ = '2022-05-05'
|
__date__ = '2022-05-06'
|
||||||
__author__ = 'Jakub Roztocil'
|
__author__ = 'Jakub Roztocil'
|
||||||
__licence__ = 'BSD'
|
__licence__ = 'BSD'
|
||||||
|
@@ -3,7 +3,7 @@ from contextlib import redirect_stderr, redirect_stdout
|
|||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from httpie.context import Environment
|
from httpie.context import Environment
|
||||||
from httpie.internal.update_warnings import _fetch_updates
|
from httpie.internal.update_warnings import _fetch_updates, _get_suppress_context
|
||||||
from httpie.status import ExitStatus
|
from httpie.status import ExitStatus
|
||||||
|
|
||||||
STATUS_FILE = '.httpie-test-daemon-status'
|
STATUS_FILE = '.httpie-test-daemon-status'
|
||||||
@@ -44,6 +44,7 @@ def run_daemon_task(env: Environment, args: List[str]) -> ExitStatus:
|
|||||||
assert options.daemon
|
assert options.daemon
|
||||||
assert options.task_id in DAEMONIZED_TASKS
|
assert options.task_id in DAEMONIZED_TASKS
|
||||||
with redirect_stdout(env.devnull), redirect_stderr(env.devnull):
|
with redirect_stdout(env.devnull), redirect_stderr(env.devnull):
|
||||||
DAEMONIZED_TASKS[options.task_id](env)
|
with _get_suppress_context(env):
|
||||||
|
DAEMONIZED_TASKS[options.task_id](env)
|
||||||
|
|
||||||
return ExitStatus.SUCCESS
|
return ExitStatus.SUCCESS
|
||||||
|
@@ -11,7 +11,7 @@ import platform
|
|||||||
import sys
|
import sys
|
||||||
import httpie.__main__
|
import httpie.__main__
|
||||||
from contextlib import suppress
|
from contextlib import suppress
|
||||||
from subprocess import Popen
|
from subprocess import Popen, DEVNULL
|
||||||
from typing import Dict, List
|
from typing import Dict, List
|
||||||
from httpie.compat import is_frozen, is_windows
|
from httpie.compat import is_frozen, is_windows
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ def _start_process(cmd: List[str], **kwargs) -> Popen:
|
|||||||
if not is_frozen:
|
if not is_frozen:
|
||||||
main_entrypoint = httpie.__main__.__file__
|
main_entrypoint = httpie.__main__.__file__
|
||||||
prefix += [main_entrypoint]
|
prefix += [main_entrypoint]
|
||||||
return Popen(prefix + cmd, close_fds=True, shell=False, **kwargs)
|
return Popen(prefix + cmd, close_fds=True, shell=False, stdout=DEVNULL, stderr=DEVNULL, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def _spawn_windows(cmd: List[str], process_context: ProcessContext) -> None:
|
def _spawn_windows(cmd: List[str], process_context: ProcessContext) -> None:
|
||||||
|
@@ -17,6 +17,7 @@ from .processing import Conversion, Formatting
|
|||||||
from .streams import (
|
from .streams import (
|
||||||
BaseStream, BufferedPrettyStream, EncodedStream, PrettyStream, RawStream,
|
BaseStream, BufferedPrettyStream, EncodedStream, PrettyStream, RawStream,
|
||||||
)
|
)
|
||||||
|
from ..utils import parse_content_type_header
|
||||||
|
|
||||||
|
|
||||||
MESSAGE_SEPARATOR = '\n\n'
|
MESSAGE_SEPARATOR = '\n\n'
|
||||||
@@ -163,7 +164,10 @@ def get_stream_type_and_kwargs(
|
|||||||
if not is_stream and message_type is HTTPResponse:
|
if not is_stream and message_type is HTTPResponse:
|
||||||
# If this is a response, then check the headers for determining
|
# If this is a response, then check the headers for determining
|
||||||
# auto-streaming.
|
# auto-streaming.
|
||||||
is_stream = headers.get('Content-Type') == 'text/event-stream'
|
raw_content_type_header = headers.get('Content-Type', None)
|
||||||
|
if raw_content_type_header:
|
||||||
|
content_type_header, _ = parse_content_type_header(raw_content_type_header)
|
||||||
|
is_stream = (content_type_header == 'text/event-stream')
|
||||||
|
|
||||||
if not env.stdout_isatty and not prettify_groups:
|
if not env.stdout_isatty and not prettify_groups:
|
||||||
stream_class = RawStream
|
stream_class = RawStream
|
||||||
|
@@ -124,6 +124,10 @@ def test_redirected_stream(httpbin):
|
|||||||
['Accept:text/event-stream'],
|
['Accept:text/event-stream'],
|
||||||
3
|
3
|
||||||
),
|
),
|
||||||
|
(
|
||||||
|
['Accept:text/event-stream; charset=utf-8'],
|
||||||
|
3
|
||||||
|
),
|
||||||
(
|
(
|
||||||
['Accept:text/plain'],
|
['Accept:text/plain'],
|
||||||
1
|
1
|
||||||
|
Reference in New Issue
Block a user