Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rednafi/httpurr

ᗢ HTTP status codes on speed dial
https://github.com/rednafi/httpurr

cli golang http http-code status-code

Last synced: 5 days ago
JSON representation

ᗢ HTTP status codes on speed dial

Awesome Lists containing this project

README

        


ᗢ httpurr


>> HTTP status codes on speed dial <<

---

![img][cover-img]

## Installation

* On MacOS, brew install:

```sh
brew tap rednafi/httpurr https://github.com/rednafi/httpurr \
&& brew install httpurr
```

* Or elsewhere, go install:

```sh
go install github.com/rednafi/httpurr/cmd/httpurr
```

* Else, download the appropriate [binary] for your CPU arch and add it to the `$PATH`.

## Quickstart

* List the HTTP status codes:

```sh
httpurr --list
```

```txt
ᗢ httpurr
==========

Status Codes
------------

------------------ 1xx ------------------

100 Continue
101 Switching Protocols
102 Processing
103 Early Hints

------------------ 2xx ------------------
...
```

* Filter the status codes by categories:

```sh
httpurr --list --cat 2
```

```txt
ᗢ httpurr
==========

Status Codes
------------

------------------ 2xx ------------------

200 OK
201 Created
202 Accepted
203 Non-Authoritative Information
204 No Content
205 Reset Content
206 Partial Content
207 Multi-Status
208 Already Reported
226 IM Used
```

* Display the description of a status code:

```sh
httpurr --code 410
```

```txt
ᗢ httpurr
==========

Description
-----------

The HyperText Transfer Protocol (HTTP) 410 Gone client error response code
indicates that access to the target resource is no longer available at the
origin server and that this condition is likely to be permanent.

If you don't know whether this condition is temporary or permanent, a 404 status
code should be used instead.

Status
------

410 Gone

Source
------

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410
```
* See all available options:

```sh
httpurr --help
```

```txt
ᗢ httpurr
==========

Usage of httpurr:
--cat [category]
Print HTTP status codes by category with --list;
allowed categories are 1, 2, 3, 4, 5
-c, --code [status code]
Print the description of an HTTP status code
-h, --help
Print usage
-l, --list
Print HTTP status codes
-v, --version
Print version
```

## Development

* Clone the repo.
* Go to the root directory and run:
```sh
make init
```
* Run the linter:
```sh
make lint
```
* Run the tests:
```sh
make test
```
* To publish a new version, create a new [release] with a [tag], and the [CI] will take care
of the rest.

[cover-img]: https://github.com/rednafi/httpurr/assets/30027932/e7e8051b-ce83-4a2a-afd9-d6cba33cadac
[binary]: https://github.com/rednafi/httpurr/releases/latest
[tag]: https://github.com/rednafi/httpurr/tags
[release]: https://github.com/rednafi/httpurr/releases/new
[CI]: ./.github/workflows/release.yml