Skip to content

Commit a052179

Browse files
committed
trying ti fix issue: Configure simple --json #1486
Open
1 parent 5b604c3 commit a052179

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+9835
-0
lines changed

build/lib/httpie/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"""
2+
HTTPie: modern, user-friendly command-line HTTP client for the API era.
3+
4+
"""
5+
6+
__version__ = '3.2.4'
7+
__date__ = '2024-11-01'
8+
__author__ = 'Jakub Roztocil'
9+
__licence__ = 'BSD'

build/lib/httpie/__main__.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""The main entry point. Invoke as `http' or `python -m httpie'.
2+
3+
"""
4+
5+
6+
def main():
7+
try:
8+
from httpie.core import main
9+
exit_status = main()
10+
except KeyboardInterrupt:
11+
from httpie.status import ExitStatus
12+
exit_status = ExitStatus.ERROR_CTRL_C
13+
14+
return exit_status.value
15+
16+
17+
if __name__ == '__main__': # pragma: nocover
18+
import sys
19+
sys.exit(main())

build/lib/httpie/adapters.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from httpie.cli.dicts import HTTPHeadersDict
2+
from requests.adapters import HTTPAdapter
3+
4+
5+
class HTTPieHTTPAdapter(HTTPAdapter):
6+
7+
def build_response(self, req, resp):
8+
"""Wrap the original headers with the `HTTPHeadersDict`
9+
to preserve multiple headers that have the same name"""
10+
11+
response = super().build_response(req, resp)
12+
response.headers = HTTPHeadersDict(getattr(resp, 'headers', {}))
13+
return response

build/lib/httpie/cli/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)