From bb8e45383e9619ddf3de8fc63974ca8ebdbc3da5 Mon Sep 17 00:00:00 2001 From: yhirose Date: Thu, 17 Mar 2022 08:38:00 -0400 Subject: [PATCH] Update README --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 6fff449..3d6e55f 100644 --- a/README.md +++ b/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