page7.lua 314 B

12345678910
  1. -- reflect the request information as JSON
  2. json = require "json"
  3. response = json.encode(mg.request_info)
  4. mg.response.status = 200
  5. mg.response.http_headers["Content-Type"] = "application/json; charset=utf-8";
  6. mg.response.http_headers["Content-Length"] = #response;
  7. mg.response.send()
  8. mg.write(response)