Skip to content
queueb-orgPublic

About

A Simple HTTP Echo Application for internal testing purposes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

http-echo

http-echo is a small HTTP server that returns the current server time for each request.

Requirements

  • Go 1.27 or later to build from source
  • Linux (x64 or arm64), macOS (x64 or arm64), or Windows (x64) to run the compiled binary

Installation

Build the executable locally:

mkdir -p bin
go build -o bin/httpecho .

Move bin/httpecho (or httpecho.exe on Windows) to a directory on your PATH, then check the available commands:

httpecho --help

Usage

Start the server:

httpecho server

It listens on :8085 by default. Change the address with --address (or -H) or the HTTP_ECHO_ADDRESS environment variable:

httpecho server --address :8080
curl http://localhost:8080/

The root endpoint returns the current time as text. Send Content-Type: application/json to receive a JSON response. The server also provides /queue and Prometheus metrics at /metrics.

To require the X-Auth-Token header on incoming requests, set --auth-token (or HTTP_ECHO_AUTH_TOKEN):

httpecho server --auth-token change-me

Development

Run the test suite:

go test ./...

Build a development binary with the repository helper:

./hack/build.sh

The binary is written to bin/httpecho.

Versioning

This project follows Semantic Versioning.

About

A Simple HTTP Echo Application for internal testing purposes.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages