Skip to content

Add flag to output structured data #13

@ZevEisenberg

Description

@ZevEisenberg

I just integrated httpcode into a LaunchBar action so I have a convenient micro-GUI for searching HTTP status codes. It would be nice to have structured output, probably as JSON, so I can easily do additional formatting without having to do best-guess parsing of the output format. For example, I'd love to see something like:

hc --json 40[12]
[
  {
    "code": "401",
    "message": "Unauthorized",
    "explanation": "No permission -- see authorization schemes"
  },
  {
    "code": "402",
    "message": "Payment Required",
    "explanation": "No payment -- see charging schemes"
  }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions