examples/

directory
v0.28.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: MIT

README

requestCore Examples

Runnable demos for the root library. See the root README.md for full documentation.

Example Framework Port Run command
chi-hello chi + net/http 8080 go run ./examples/chi-hello
gin-hello Gin 8081 go run ./examples/gin-hello
fiber-hello Fiber 8082 go run ./examples/fiber-hello

Each example exposes the same three routes:

  • GET /health — liveness check
  • GET /users/{id} — URL parameter extraction
  • POST /echo — JSON body parsing and response

Smoke tests

After starting chi-hello on port 8080:

curl http://localhost:8080/health
curl http://localhost:8080/users/42
curl -X POST http://localhost:8080/echo -d '{"message":"hi"}' -H 'Content-Type: application/json'

After starting gin-hello on port 8081, replace 8080 with 8081 in the commands above.

After starting fiber-hello on port 8082, replace 8080 with 8082 in the commands above.

Next steps

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL