Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper JSON handling for :=/:=@ #1213

Merged
merged 3 commits into from Nov 26, 2021

Conversation

isidentical
Copy link
Contributor

Fixes #1212

@codecov-commenter
Copy link

Codecov Report

Merging #1213 (664d21e) into master (4d7d6b6) will decrease coverage by 0.53%.
The diff coverage is 94.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1213      +/-   ##
==========================================
- Coverage   97.28%   96.75%   -0.54%     
==========================================
  Files          67       72       +5     
  Lines        4235     4677     +442     
==========================================
+ Hits         4120     4525     +405     
- Misses        115      152      +37     
Impacted Files Coverage Δ
tests/test_auth.py 100.00% <ø> (ø)
tests/test_binary.py 100.00% <ø> (ø)
httpie/compat.py 16.66% <9.09%> (-83.34%) ⬇️
tests/conftest.py 76.47% <54.54%> (-10.49%) ⬇️
tests/test_ssl.py 91.01% <63.63%> (-3.93%) ⬇️
httpie/models.py 94.73% <83.33%> (-2.64%) ⬇️
httpie/output/formatters/colors.py 92.66% <83.33%> (-0.92%) ⬇️
httpie/cli/requestitems.py 90.69% <92.00%> (-0.48%) ⬇️
tests/utils/http_server.py 97.14% <97.14%> (ø)
httpie/__init__.py 100.00% <100.00%> (ø)
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef62fc1...664d21e. Read the comment docs.

@isidentical
Copy link
Contributor Author

@jakubroztocil do you have any idea about why the links from the coverage bot is not working? I can't see what part decreased the cover, since every link I click is broken.

Copy link
Member

@jkbrzt jkbrzt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍🏻 Tweaked the docs a bit. Please also add a CHANGELOG entry.

docs/README.md Outdated
Comment on lines 713 to 715
Be aware that when using this syntax with form data (`--form` is activated);
only strings, numbers and floats are enabled. Rest of the JSON types are not
available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Be aware that when using this syntax with form data (`--form` is activated);
only strings, numbers and floats are enabled. Rest of the JSON types are not
available.
The `:=` syntax is JSON-specific. You can switch your request to `--form` or `--multipart`,
and string, float, and number values will continue to be serialized (as string form values).
Other JSON types, however, are not allowed with `--form` or `--multipart`.

@jkbrzt jkbrzt merged commit 6bdcdf1 into httpie:master Nov 26, 2021
@isidentical isidentical deleted the json-arguments-on-forms branch December 8, 2021 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JSON only operator handling for :=/:=@ --form/--multipart
3 participants