aboutsummaryrefslogtreecommitdiff
path: root/docs/ref/api/http.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref/api/http.md')
-rw-r--r--docs/ref/api/http.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/ref/api/http.md b/docs/ref/api/http.md
index 05821cbc..c02881d5 100644
--- a/docs/ref/api/http.md
+++ b/docs/ref/api/http.md
@@ -644,6 +644,21 @@ sent, if possible, and the connection will be closed.
The _aio_ may be scheduled for deferred completion using the [`nng_aio_start`].
+### Freeing Handler
+
+```c
+void nng_http_handler_free(nng_http_handler *h);
+```
+
+The {{i:`nng_http_handler_free`}} function frees an allocated HTTP server handler.
+Normally there is no reason to call this function, because the handler is freed with
+the server it was registered with.
+
+> [!IMPORTANT]
+> It is an error to free a handler that is registered with a server.
+> Any handlers that are registered with servers are automatically freed
+> when the server itself is deallocated.
+
### Serving Directories and Files
```c