🥧 HTTPie CLI — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more.
Go to file
Mickaël Schoentgen 4f1c9441c5
Fix encoding error with non-prettified encoded responses (#1168)
* Fix encoding error with non-prettified encoded responses

Removed `--format-option response.as` an promote `--response-as`: using
the format option would be misleading as it is now also used by non-prettified
responses.

* Encoding refactoring

* split --response-as into --response-mime and --response-charset
* add support for Content-Type charset for requests printed to terminal
* add support charset detection for requests printed to terminal without a Content-Type charset
* etc.

* `test_unicode.py` → `test_encoding.py`

* Drop sequence length check

* Clean-up tests

* [skip ci] Tweaks

* Use the compatible release clause for `charset_normalizer` requirement

Cf. https://www.python.org/dev/peps/pep-0440/#version-specifiers

* Clean-up

* Partially revert d52a4833e4

* Changelog

* Tweak tests

* [skip ci] Better test name

* Cleanup tests and add request body charset detection

* More test suite cleanups

* Cleanup

* Fix code style in test

* Improve detect_encoding() docstring

* Uniformize pytest.mark.parametrize() calls

* [skip ci] Comment out TODOs (will be tackled in a specific PR)

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-10-06 17:27:07 +02:00
.github Add documentation about our release process (#1159) 2021-10-06 16:45:44 +02:00
docs Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
extras Add documentation about our release process (#1159) 2021-10-06 16:45:44 +02:00
httpie Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
tests Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
.editorconfig Update links to HTTPS 2019-08-30 10:07:01 +02:00
.gitignore Add a Packit configuration for Fedora packaging (#1086) 2021-06-09 17:18:27 +02:00
.packit.yaml Packit: Get the current Fedora Rawhide specfile 2021-09-07 11:03:04 +02:00
AUTHORS.md Switch from reStructuredText to Markdown and add docs/ (#1139) 2021-09-06 17:36:13 +02:00
CHANGELOG.md Fix encoding error with non-prettified encoded responses (#1168) 2021-10-06 17:27:07 +02:00
CODE_OF_CONDUCT.md Add a workflow to check documentations (#1151) 2021-09-09 15:52:24 +02:00
CONTRIBUTING.md Add a workflow to check documentations (#1151) 2021-09-09 15:52:24 +02:00
LICENSE 2021 2021-02-06 13:29:02 +01:00
Makefile Add documentation about our release process (#1159) 2021-10-06 16:45:44 +02:00
MANIFEST.in Switch from reStructuredText to Markdown and add docs/ (#1139) 2021-09-06 17:36:13 +02:00
README.md Update README.md 2021-10-03 03:20:23 +02:00
setup.cfg Expand the pytest configuration (#1161) 2021-09-20 17:36:03 +02:00
setup.py Add install/update instructions database (#1160) 2021-10-06 11:18:27 +02:00
snapcraft.yaml [snap] Improve OS integration (#1157) 2021-09-15 16:50:44 +02:00


HTTPie

HTTPie: human-friendly CLI HTTP client for the API era

HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI interaction with web services as human-friendly as possible. HTTPie is designed for testing, debugging, and generally interacting with APIs & HTTP servers. The http & https commands allow for creating and sending arbitrary HTTP requests. They use simple and natural syntax and provide formatted and colorized output.

Docs Latest version Build Coverage Twitter Chat

HTTPie in action

Getting started

Features

  • Expressive and intuitive syntax
  • Formatted and colorized terminal output
  • Built-in JSON support
  • Forms and file uploads
  • HTTPS, proxies, and authentication
  • Arbitrary request data
  • Custom headers
  • Persistent sessions
  • wget-like downloads

See all features →

Examples

Hello World:

$ https httpie.io/hello

Custom HTTP method, HTTP headers and JSON data:

$ http PUT pie.dev/put X-API-Token:123 name=John

Build and print a request without sending it using offline mode:

$ http --offline pie.dev/post hello=offline

Use GitHub API to post a comment on an Issue with authentication:

$ http -a USERNAME POST https://api.github.com/repos/httpie/httpie/issues/83/comments body='HTTPie is awesome! :heart:'

See more examples →

Community & support

Contributing

Have a look through existing Issues and Pull Requests that you could help with. If you'd like to request a feature or report a bug, please create a GitHub Issue using one of the templates provided.

See contribution guide →