created: 20260726073547121 modified: 20260726085801292 tags: tiddlywiki title: files API demo type: text/vnd.tiddlywiki \procedure store-file-list() <$action-setfield $tiddler="$:/temp/files-list" text=<> type="application/json" /> \end <$button> <$action-sendmessage $message="tm-http-request" url="./api/files" method="GET" oncompletion=<> /> 刷新文件列表
<$text text={{$:/temp/files-list}}/>
[img[./files/photo_2026-07-26_11-10-12.jpg]] ```caddyfile example.com { encode zstd gzip @api path /api/* reverse_proxy @api localhost:3000 header { X-Content-Type-Options nosniff } } ``` ```json5 { // 支持注释 unquoted: 'value', hexadecimal: 0xFF, infinity: Infinity, trailingComma: true, } ```