httpx
httpx copied to clipboard
Flag to display first N characters of the response body
Please describe your feature request:
It'd be nice to have a flag to show the first N characters of the response body with httpx.
Example usage:
$ cat urls.txt | httpx -title -body-preview 100
http://something.com:25 [] [220 environment.something.org ESMTP Postfix (Debian/GNU)221 2.7.0 Error: I can break rules, too. Go]
In this case, the response had no HTML tags. However, maybe it should be considered to strip all HTML tags so that the response preview only contains the useful text.
Describe the use case of this feature:
When monitoring URLs with httpx -title, sometimes you stumble upon pages that have no HTML title.
While there are other display flags that can be used to have a sense of what a specific host is running, a preview of the response body would be great.
Thank you