浏览代码

Update README

yhirose 3 年之前
父节点
当前提交
bb8e45383e
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      README.md

+ 9 - 0
README.md

@@ -183,6 +183,15 @@ The followings are built-in mappings:
 | webm       | video/webm                  | zip        | application/zip             |
 | mp3        | audio/mp3                   | wasm       | application/wasm            |
 
+### File request handler
+
+```cpp
+// The handler is called right before the response is sent to a client
+svr.set_file_request_handler([](const Request &req, Response &res) {
+  ...
+});
+```
+
 NOTE: These static file server methods are not thread-safe.
 
 ### Logging