Re:The time might come when we add some JSON specific comman...
by lambdaba on Thursday January 20, 2022 @01:33PM
(#30012714)
Since htttpie can't do nested JSON assignments I like to use jo, like this:
Piped JSON automatically uses POST
[ Parent
| on HN ]
Re:The time might come when we add some JSON specific comman...
by treesciencebot on Thursday January 20, 2022 @03:12PM
(#30014087)
(HTTPie maintainer here)
You might be in luck since Nested JSON support is going to be star feature of our upcoming release. Here is a sneak peek:
$ http --offline --print=B pie.dev/post \ search[type]=client \ search[stars]:=50000 \ search[platforms][]=Web \ search[platforms][]=Desktop \ search[platforms][]=Mobile \ search[platforms][]=CLI
{ "search": { "platforms": [ "Web", "Desktop", "Mobile", "CLI" ], "stars": 50000, "type": "client" } }
We are rolling a brand-new mini-language that integrates really well with the existing request building syntax, but also features stuff like JSON type-safety and amazing error messages for basic syntax errors.
Re:The time might come when we add some JSON specific comman...
by CobrastanJorji on Thursday January 20, 2022 @03:38PM
(#30014551)
That sounds great! Any chance of HTTP/2 or HTTP/3 support?
Re:The time might come when we add some JSON specific comman...
by treesciencebot on Thursday January 20, 2022 @04:28PM
(#30015309)
It will probably be post 3.0, since the underlying HTTP interface we use (https://pypi.org/project/requests) does not support HTTP/2. We are currently discussing how to migrate from that to something like httpx, without causing any change of user-visible behavior.
Re:The time might come when we add some JSON specific comman...
by CGamesPlay on Thursday January 20, 2022 @01:51PM
(#30012950)
This is amazing! Definitely adding to my toolbox.