deceptive-ai / test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ᗢ httpurr

>> HTTP status codes on speed dial <<

img

Installation

  • On MacOS, brew install:

    brew tap rednafi/httpurr https://github.com/rednafi/httpurr \
        && brew install httpurr
  • Or elsewhere, go install:

    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:

    httpurr -list
    ᗢ httpurr
    ==========
    
    Status Codes
    ------------
    
    ------------------ 1xx ------------------
    
    100    Continue
    101    Switching Protocols
    102    Processing
    103    Early Hints
    
    ------------------ 2xx ------------------
    ...
  • Filter the status codes by categories:

    httpurr -list -cat 2
    ᗢ 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:

    httpurr -code 410
    ᗢ 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
    

Development

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

About

License:MIT License


Languages

Language:Go 97.0%Language:Ruby 2.4%Language:Makefile 0.7%