Skip to content

tonyvugithub/HttpStatusCodeAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What's the status?

Description: A simple API endpoint for response http status codes

How to use?

  1. Run in local web server
       go run main.go
    If you don't have GO, go here for instructions of installation
    API will be ported at port 8080. And you can access following this format localhost:8080/status/[code number]
    Eg: localhost:8080/status/404
    => This will return a document with 404 status
  2. Opens executable file by double-clicking release file that is compatible with your system.
  3. Accesses API through network, please follow the format below:
    https://arcane-basin-93470.herokuapp.com/status/[_code_number_]
    Eg: https://arcane-basin-93470.herokuapp.com/status/200
    => This will return a document with 200 status

Features

  1. Add delay time for response, by simply include a delay query
    Eg1: [host]/status/503?delay=10
    => response with status code 503 after 10 seconds
    Eg2: [host]/status/500?delay=10s
    => response with status code 500 after 10 seconds
    Eg3: [host]/status/501?delay=5000ms
    => response with status code 501 after 5000 miliseconds

Note: This API has all the status codes that you can get back from GET request, 2xx - 5xx

About

A simple API endpoint for http status codes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages