Closed ryanerwin closed 4 years ago
@ryanerwin thanks for the suggestion. We used to have a XML/HTML formatter, but these languages are notoriously problematic in this regard, and there simply is no usable parser/formatter that we could just plug in at this point. So I’m closing this for now.
@jakubroztocil Just a very vague idea: Could you maybe use prettier from https://prettier.io/ for this? I know that is commonly used in combination with editors but in the end it is just a npm module.
@tobske, HTTPie is Python-based code, it would not make sense to install the whole NodeJS suite just to have HTML formatting. We may rethink that part when we will know about a potential Python module that would solve the case.
Okay, I can understand that.
I would also be interested in a formatter for html output, would make it so much easier to read.
When printing
Content-type: application/json
httpie formats the json with newlines and indentation making it very easy to read.However, when returning text/html, the output is syntax highlighted but not reformatted with newlines and indentation. For short HTML pages, reformatting would make the results a lot more easily readable.
Syntax highlighting is fantastic, but would be very easy to read like: