curl --json#8314
Closed
bagder wants to merge 3 commits into
Closed
Conversation
Member
|
|
This comment has been minimized.
This comment has been minimized.
|
Can I still overwrite the accept header? Some restful endpoints might return a document, an image etc instead. |
Contributor
|
Seems so. Just look at : https://github.com/curl/curl/pull/8314/files#diff-76a23840b36e3f9c5485019056c5ea0e3d195d6c55c9c1f5b2d3a16844674c0b around line 578 |
Member
Author
|
Yes, exactly like we're used to. The test cases I added verify that both headers this option sets can be overridden. |
383 - simple single command line option 384 - reading it from stdin 385 - getting two --json options on command line 386 - --next works after --json
Member
Author
|
Ok, I'll merge this within 24 hours. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
--json <data>is a shortcut for--data-binary <data> -H "Content-Type: application/json" -H "Accept: application/json"While the discussion continues on the curl-users list and in #8312, here's something to check and play with.