Files
cpp-project-template/third_party/prometheus/3rdparty/civetweb/test/page7.lua

11 lines
314 B
Lua
Raw Normal View History

2025-08-22 18:22:57 +08:00
-- reflect the request information as JSON
json = require "json"
response = json.encode(mg.request_info)
mg.response.status = 200
mg.response.http_headers["Content-Type"] = "application/json; charset=utf-8";
mg.response.http_headers["Content-Length"] = #response;
mg.response.send()
mg.write(response)