const CGI = api.cgi

CGI.isLocalServer || throw "This page only runs in local server mode."
const R = CGI.request
const rc = object{
  ENV: R.ENV,
  GET: R.GET,
  POST: R.POST,
  COOKIES: R.COOKIES,
  CGI:object {
    config: api.cgi.config
  }
}

rc.ENV.sortProperties()
Fossil.sorter(rc)
Fossil.sorter(rc.COOKIES)

$out '<h2>api.cgi.config</h2>'
$out {<div class='code'>}
$out CGI.config.toJSONString() // [CGI.toJSONString CGI.config]
$out {</div>}

$out '<h2>api.cgi environment</h2>'
$out {<div class='code'>}
$out [CGI.htmlEscape [CGI.toJSONString rc]]
$out {</div>}

$out {<h2>string interning tables</h2>}
$out {<div class='code'>} scope {
  api.ob.push()
  dumpInternedStrings()
  CGI.htmlEscape(api.ob.pop(1))
} {</div>}

