Commit Graph

662 Commits

Author SHA1 Message Date
Sebastian Czech
17ed3bb8c5
Store prompted passwords in local sessions (#1239)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2021-12-29 12:00:47 +03:00
Batuhan Taskaya
05c02f0f39 Update shortcuts as well 2021-12-24 11:53:31 +03:00
Batuhan Taskaya
0ebc9a7e09 Mention about levels in -v 2021-12-24 11:53:15 +03:00
Batuhan Taskaya
c692669526 Fix -v docs to include BASE_OUTPUT_OPTIONS 2021-12-24 11:51:11 +03:00
Batuhan Taskaya
747accc2ae Include response metadata in --print help 2021-12-24 11:50:19 +03:00
Batuhan Taskaya
f3b500119c
Implement basic metrics layout & total elapsed time (#1250)
* Initial metadata processing

* Dynamic coloring and other stuff

* Use -vv / --meta

* More testing

* Cleanup

* Tweek message

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-12-23 12:13:25 -08:00
Batuhan Taskaya
e0e03f3237
Better DNS error handling (#1249)
* Better DNS error handling

* Update httpie/core.py

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-12-23 11:35:30 -08:00
Batuhan Taskaya
be87da8bbd
Formalize @ suffix for all operators (#1225)
* Formalize @ suffix for all operators

* Separate the section

* Address suggestions
2021-12-23 11:06:35 -08:00
Batuhan Taskaya
e09401b81a
Optimize encoding detection (#1243)
* Optimize encoding detection

* Use a threshold based system
2021-12-23 11:05:58 -08:00
Batuhan Taskaya
8dc6c0df77
Implement new pie and pie-light styles (#1238)
* Implement new `pie` and `pie-light` styles

* Change some pallete

* Integrate the color palette

* some docs

* some docs

* Rework on code generation

* Apply suggestions from code review

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-12-19 02:41:42 -08:00
Batuhan Taskaya
1bd8422fb5
Improve startup time when pyOpenSSL is available on the environment (#1233) 2021-12-17 00:00:22 -08:00
Batuhan Taskaya
c237e15108
Faster downloads through bigger chunks / less buffering (#1236) 2021-12-17 00:00:03 -08:00
Batuhan Taskaya
a5d8b51e47
Implement httpie upgrade for upgrading plugins (#1241)
* Implement `httpie upgrade` for upgrading plugins

* Support upgrades for every installation type

* Fix decoding problems
2021-12-16 23:59:39 -08:00
Batuhan Taskaya
2b78d04410
Strip out extra variables from the actual mime type (#1244)
* Strip out extra variables from the actual mime type

* mention in changelog

* Update CHANGELOG.md

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-12-16 07:04:34 -08:00
Batuhan Taskaya
3db1cdba4c
Don't inconsistently add XML declarations (#1227) 2021-12-14 07:15:19 -08:00
Batuhan Taskaya
207b970d94
Automatically enable --stream on server sent events (#1226)
* Automatically enable --stream when used chunked encoding

* try fix 3.6 mock issue

* Only enable on text/event-stream

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-12-08 07:49:12 -08:00
Batuhan Taskaya
62e43abc86
Ignore crashes that happen on the 3rd party plugins (#1228)
* Ignore crashes that happen on the 3rd party plugins

* Give a suggestion about how to uninstall
2021-12-08 07:45:07 -08:00
Batuhan Taskaya
df58ec683e
Add nested JSON syntax to the HTTPie DSL (#1224)
* Add support for nested JSON syntax (#1169)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>

* minor improvements

* unpack top level lists

* Write more docs

* doc style changes

* fix double quotes

Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-12-03 02:17:45 -08:00
Jakub Roztocil
840f77d2a8 Tweak changelog & 3.0.0.dev0 2021-12-01 20:44:04 +01:00
Batuhan Taskaya
151becec2b
Improve startup time with lazy loading some args (#1221)
* Improve startup time with lazy loading some args

* add some tests

* Add changelog entry

* Update CHANGELOG.md

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-12-01 10:15:59 -08:00
Batuhan Taskaya
ba8e4097e8
Support ==@ syntax for query parameter values from file (#1218)
Co-authored-by: Vladimir Berkutov <vladimir.berkutov@gmail.com>

Co-authored-by: Vladimir Berkutov <vladimir.berkutov@gmail.com>
2021-12-01 10:09:39 -08:00
Batuhan Taskaya
00b366a81f
Implement Bearer Auth (#1216) 2021-12-01 09:37:57 -08:00
Batuhan Taskaya
5bf696d113
Fix packit CI (#1219) 2021-11-30 13:49:38 +03:00
Batuhan Taskaya
3081fc1a3c
Add httpie --version (#1220) 2021-11-30 13:18:37 +03:00
Batuhan Taskaya
245cede2c2
cmd: Implement httpie plugins interface (#1200) 2021-11-30 11:12:51 +03:00
Batuhan Taskaya
6bdcdf1eba
Proper JSON handling for :=/:=@ (#1213)
* Proper JSON handling for :=/:=@

* document the behavior

* fixup docs
2021-11-26 03:45:46 -08:00
Batuhan Taskaya
ef62fc11bf
core: support custom request/response classes (#1205)
* core: support custom request/response classes

* Move to `httpie.models`, prefix with `Requests`
2021-11-24 15:45:39 -08:00
Batuhan Taskaya
c000886546
Preserve individual headers with the same name on responses (#1208)
* Preserve individual headers with the same name on responses

* Rename RequestHeadersDict to HTTPHeadersDict

* Update tests/utils/http_server.py

* Update tests/utils/http_server.py

* Update httpie/adapters.py

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-11-24 15:41:37 -08:00
Jakub Roztocil
861b8b36a8
Strip leading :// from URLs to allow quick conversion of a pasted URL to calls (#1197)
* Strip leading `://` from URLs to allow quick conversion of a pasted URL to calls

Closes #1195

* Markdown lint

* Cleanup

* Cleanup

* Drop extraneous space

* Fix example
2021-11-05 13:59:23 +01:00
Batuhan Taskaya
7cdd74fece
Support multiple headers sharing the same name (#1190)
* Support multiple headers sharing the same name

* Apply suggestions

* Don't normalize HTTP header names

* apply visual suggestions

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>

* bump down multidict to 4.7.0

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-10-31 15:04:39 +01:00
Mickaël Schoentgen
3abc76f6d5 Tiny docstring clean-up 2021-10-19 10:24:01 +02:00
Mickaël Schoentgen
021eb651e0
Bump the version to 2.7.0.dev0 (#1188) 2021-10-19 10:21:45 +02:00
Mickaël Schoentgen
419427cfb6
Update downstream files for HTTPie 2.6.0 (#1186)
* Update Alpine package

* Add charset-normalizer deps for Alpine

It currently does not exist. We will need to add it ourselves.

* Update Gentoo package

* Update Brew formula

* Update MacPorts port

* Fix Gentoo deps

* Update examples

* Update Void Linux package

* Update Void Linux commands

* Update Chocolateur package

* Review DEbian packaging details

* Simplify Void Linux package

* Update more packages

* Update summary everywhere

* Remove temporary file

* Update Chocolatey package URL

* Updates

* Update Spack
2021-10-19 10:18:35 +02:00
Mickaël Schoentgen
42af2f786f
v2.6.0 (#1182)
[skip ci]
2021-10-14 10:36:39 +02:00
Mickaël Schoentgen
19691bba68 Packaging documentation tweaks 2021-10-11 17:42:29 +02:00
dkreeft
6befaf9067
Added the ability to silence warnings via double -q or --quiet (#1175)
* change behavior of '--quiet' to silence errors and warnings when passed twice together with '--check-status'

* Apply suggestions from code review

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>

* remove header, trailing comma, rename constant and variable

* fix flags for tests

* [skip ci] Update ticket number

Co-authored-by: Dave <d.kreeft@outlook.com>
Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
Co-authored-by: Mickaël Schoentgen <contact@tiger-222.fr>
2021-10-08 14:18:11 +02:00
Mickaël Schoentgen
50f57f8c82
Add help output for --chunked (#1174) 2021-10-07 17:37:06 +02:00
Mickaël Schoentgen
3869c3ce99 Remove unused import 2021-10-07 14:41:03 +02:00
Jakub Roztocil
ef4fa20ceb Tweak 2021-10-06 19:31:43 +02:00
Jakub Roztocil
7e0bed4e54 Add more types and docs for plugins API II. 2021-10-06 19:28:21 +02:00
Jakub Roztocil
e1627803fe Add more types and docs for plugins API 2021-10-06 19:24:10 +02:00
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
Jakub Roztocil
4ef31ecf71
Update utils.py 2021-10-02 16:43:29 +02:00
Mickaël Schoentgen
71adcd97d0
Improve handling of prettified responses without correct content-type encoding (#1110)
* Improve handling of responses without correct content-type charset

* [skip ci] Minor tweaks in tests

* [skip ci] Add documentation

Co-authored-by: claudiatd <claudiatd@gmail.com>

* Improve unknown encoding test

[skip ci]

* Review mime and options retrieval

* Add full content-type example in help output

* Simplify decoder

* [skip ci] s/charset/encoding/

* Tweaks

* [skip ci] Fix type annotation

* [skip ci] s/charset/encoding/

* Tweaks

* Fix type annoation

* Improvement

* Introduce `codec.encode()`

* [skip ci] Tweak changelog

Co-authored-by: claudiatd <claudiatd@gmail.com>
2021-09-29 20:22:19 +02:00
Mickaël Schoentgen
b50f9aa7e7 Use PYthon 3 documentation
[skip ci]
2021-09-28 12:54:16 +02:00
Mickaël Schoentgen
fe96b2af20 Use httpie.io/docs everywhere
[skip ci]
2021-09-28 12:53:53 +02:00
Mickaël Schoentgen
727b8a2c05
Sort available style choices (#1166) 2021-09-27 16:55:10 +02:00
Mickaël Schoentgen
9c89c703ae
Allow to overwrite the response Content-Type from options (#1134)
* Allow to override the response `Content-Type` from options

* Apply suggestions from code review

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>

* Rename the option from `--response.content-type` to `--response-as`

* Update CHANGELOG.md

Co-authored-by: Jakub Roztocil <jakub@roztocil.co>
2021-09-27 13:58:19 +02:00
Mickaël Schoentgen
474093acdf
Include plugin info in --debug output (#1165)
* Include plugin info in `--debug` output

* Adapt issue number

* Fix docs
2021-09-23 17:15:14 +02:00
Mickaël Schoentgen
d7ed45bbcd
Fix duplicate keys preservation of JSON data (#1163)
* Fix duplicate keys preservation of JSON data

* Update issue number

* Fix type annotations

* Changes after review

* Rewording
2021-09-21 19:07:59 +02:00