Skip to content

AB-Lindex/http-ok

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

http-ok

Minimal Go HTTP server that responds with any HTTP status code you request. No body — just the status.

Usage

The path determines the response code:

Request Response
GET / 200 OK
GET /200 200 OK
GET /404 404 Not Found
GET /500 500 Internal Server Error

Invalid paths return 400 Bad Request.

Listens on port 8080.

Run with Docker

docker run --rm -p 8080:8080 ghcr.io/ab-lindex/http-ok
curl http://localhost:8080/200
curl http://localhost:8080/404

Build

docker build -t http-ok .

Typical use cases

  • Health check / liveness probe endpoints in Kubernetes
  • Sink for services that require an HTTP endpoint but don't care about the response
  • Testing HTTP client error handling

About

Minimal HTTP endpoint for service fixed status-responses

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors