davecheney / httpstat

It's like curl -v, with colours.
MIT License
6.95k stars 382 forks source link

Request for adding JSON output support #175

Open abhi-g80 opened 4 months ago

abhi-g80 commented 4 months ago

There already exists an PR #131 for this. Has been dormant for a while, hence requesting via a new issue. The original PR has the expected JSON out that I would expect. For brevity, pasting it here.

{
  "Address": "128.199.248.140:443",
  "Header": {
    "Connection": [
      "keep-alive"
    ],
    "Content-Type": [
      "text/html; charset=UTF-8"
    ],
    "Date": [
      "Sat, 05 May 2018 03:15:15 GMT"
    ],
    "Link": [
      "<https://dave.cheney.net/wp-json/>; rel=\"https://api.w.org/\""
    ],
    "Server": [
      "nginx/1.2.1"
    ],
    "Strict-Transport-Security": [
      "max-age=15768000"
    ],
    "X-Powered-By": [
      "PHP/5.4.45-0+deb7u11"
    ]
  },
  "Proto": "HTTP/1.1",
  "Status": "200 OK",
  "Timing": {
    "DNS": 98,
    "TCP": 191,
    "TLS": 604,
    "Server": 747,
    "Transfer": 392,
    "Lookup": 98,
    "Connect": 290,
    "PreTransfer": 895,
    "StartTransfer": 1643,
    "Total": 2036
  }
}

Not sure what the best way to get this feature added to the tool hence creating this issue. Can close this as duplicate if the original issue would be worked upon.