Rucho

Handles requests to the `/healthz` endpoint.

Returns an HTTP 200 OK status and the plain text “OK”.

get
https://rucho.org/healthz

Response

200 text/plain

Health check successful

string
get/healthz
 
200 text/plain

Returns a small sample HTML document as `text/html; charset=utf-8`.

Deliberately non-JSON — a controllable upstream for testing how a gateway
handles text/html responses.

get
https://rucho.org/html

Response

200 text/html

A sample HTML document

string
get/html
 
200 text/html

Returns a small sample XML document as `application/xml`.

Deliberately non-JSON — a controllable upstream for testing how a gateway
handles application/xml responses (e.g. content-type-aware plugins).

get
https://rucho.org/xml

Response

200 application/xml

A sample XML document

string
get/xml
 
200 application/xml

Returns a small sample image in the requested `format`.

Supported: png, jpeg (alias jpg), svg, webp — any other value
returns 400. Each returns a tiny fixed image with the matching
Content-Type, as a controllable upstream for testing gateway handling of
binary/image bodies.

get
https://rucho.org/image/{format}

Path Parameters

formatstringrequired

Image format: png, jpeg, svg, or webp

Response

A sample image in the requested format

get/image/{format}
 

Handler for the `/metrics` endpoint.

Returns a JSON object containing:

  • all_time: Total requests, successes, failures, and per-endpoint hits since server start
  • last_hour: Same metrics but only for the last 60 minutes (rolling window)

Example Response

{
"all_time": {
"total_requests": 1000,
"successes": 950,
"failures": 50,
"endpoint_hits": {
"/get": 500,
"/post": 300,
"/status/:code": 200
}
},
"last_hour": {
"total_requests": 100,
"successes": 95,
"failures": 5,
"endpoint_hits": {
"/get": 50,
"/post": 30,
"/status/:code": 20
}
}
}
get
https://rucho.org/metrics

Response

200 application/json

Request statistics as JSON: all_time totals plus a rolling last_hour window, each with total/success/failure counts and per-endpoint hits. Only mounted when metrics_enabled is set — otherwise the route returns 404.

get/metrics
 
200 application/json