3 ms·
Since htttpie can't do nested JSON assignments I like to use jo, like this: $ jo foo=$(jo bar=qux) | http example.com Piped JSON automatically uses POST
by lambdaba 5y ago
Since htttpie can't do nested JSON assignments I like to use jo, like this:
$ jo foo=$(jo bar=qux) | http example.com
Piped JSON automatically uses POST
- CGamesPlay 5y agoThis is amazing! Definitely adding to my toolbox.
- treesciencebot 5y ago(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.
- CobrastanJorji 5y agoThat sounds great! Any chance of HTTP/2 or HTTP/3 support?
- treesciencebot 5y agoIt will probably be post 3.0, since the underlying HTTP interface we use (https://pypi.org/project/requests 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.