Add /ping public API endpoint #71

Merged
vlw merged 1 commit from refs/pull/71/head into master 2026-04-05 12:18:38 +02:00
vlw commented 2026-03-29 13:27:38 +02:00 (Migrated from codeberg.org)

This PR adds a new public API endpoint /ping which is more of an endpoint for debugging. It returns all search parameters, JSON request body, and request headers.

Example response:

{
  "ping": "pong",
  "GET": {
    "foo": "bar"
  },
  "POST": [],
  "HEADERS": {
    "Te": "trailers",
    "Priority": "u=0, i",
    "Sec-Fetch-User": "?1",
    "Sec-Fetch-Site": "none",
    "Sec-Fetch-Mode": "navigate",
    "Sec-Fetch-Dest": "document",
    "Upgrade-Insecure-Requests": "1",
    "Sec-Gpc": "1",
    "Accept-Encoding": "gzip, deflate, br, zstd",
    "Accept-Language": "en-US,en;q=0.5",
    "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
    "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0",
    "Host": "local.vlw.se:44302",
    "Content-Length": "",
    "Content-Type": ""
  },
  "datetime": {
    "date": "2026-03-29 11:20:30.775397",
    "timezone_type": 3,
    "timezone": "UTC"
  }
}
This PR adds a new public API endpoint `/ping` which is more of an endpoint for debugging. It returns all search parameters, JSON request body, and request headers. Example response: ```json { "ping": "pong", "GET": { "foo": "bar" }, "POST": [], "HEADERS": { "Te": "trailers", "Priority": "u=0, i", "Sec-Fetch-User": "?1", "Sec-Fetch-Site": "none", "Sec-Fetch-Mode": "navigate", "Sec-Fetch-Dest": "document", "Upgrade-Insecure-Requests": "1", "Sec-Gpc": "1", "Accept-Encoding": "gzip, deflate, br, zstd", "Accept-Language": "en-US,en;q=0.5", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:144.0) Gecko/20100101 Firefox/144.0", "Host": "local.vlw.se:44302", "Content-Length": "", "Content-Type": "" }, "datetime": { "date": "2026-03-29 11:20:30.775397", "timezone_type": 3, "timezone": "UTC" } } ```
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
vlw/vlw.se!71
No description provided.