Mohamed Daahir
Mohamed Daahir
I think https://github.com/httpie/httpie/issues/376#issuecomment-135985056 is something we can implement easily in xh: >Actually, the best behaviour is to auto-enable --stream when you see Transfer-Encoding: chunked because the length is indeterminate.
>It might actually make sense to just always enable streaming. The encoding detection and the binary content detection would suffer but I'm not sure anything else would. I haven't thought...
As of HTTPie 3.0, `--stream` is enabled if `content-type` equals `text/event-stream`. See https://github.com/httpie/httpie/pull/1226
HTTPie supports pretty-printing XML responses, so we're probably going to add support for it in `xh`. We also wouldn't mind supporting pretty-printed HTML responses if we find a crate that...
Some experiments I've done with nom https://gist.github.com/ducaale/5d3a3df08a39d128eedab362aac34850. The plan is to support syntax like this: ```sh $ xh httpbin.org/post foo.bar=5 # {foo: {bar: 5}} $ xh httpbin.org/post foo[path.with.dots]=7 # {foo:...
>Are there use cases for that? It seems a bit niche, and treating anything between brackets as a string would be simpler. One use case I can think of is...
Some ideas to tackle the compatibility issue with the nested JSON syntax: * Disable the feature when not in tty-mode. * Let users opt-out of the feature via a flag....
>A leading dot at least looks like jq What if we use a single dot to activate the feature e.g `xh httpbin.org/post . foo[]=5 foo[]=6`?
Httpie's approach to nested JSON syntax https://github.com/httpie/httpie/pull/1169
HTTPie's nested JSON has been revised in a subsequent PR: 1. The syntax grammar is enforced now e.g unbalanced number of parenthesis is not allowed. 2. Numbers can be escaped...