diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/man/nng_http_handler_alloc.3http.adoc | 7 | ||||
| -rw-r--r-- | docs/man/nng_http_handler_set_tree.3http.adoc | 20 | ||||
| -rw-r--r-- | docs/ref/migrate/nng1.md | 1 |
3 files changed, 5 insertions, 23 deletions
diff --git a/docs/man/nng_http_handler_alloc.3http.adoc b/docs/man/nng_http_handler_alloc.3http.adoc index 8d55c752..3eb9674a 100644 --- a/docs/man/nng_http_handler_alloc.3http.adoc +++ b/docs/man/nng_http_handler_alloc.3http.adoc @@ -114,11 +114,7 @@ The `Content-Type` will be set automatically based upon the extension of the requested file name. If a content type cannot be determined from the extension, then `application/octet-stream` is used. -The directory handler is created as a tree handler initially in exclusive mode (see -xref:nng_http_handler_set_tree.3http.adoc[nng_http_handler_set_tree_exclusive]). -This can be changed by calling -xref:nng_http_handler_set_tree.3http.adoc[nng_http_handler_set_tree(3http)] -after creating the directory handler. +The directory handler is created as a tree handler. === File Handler @@ -183,7 +179,6 @@ xref:nng_http_handler_free.3http.adoc[nng_http_handler_free(3http)], xref:nng_http_handler_set_host.3http.adoc[nng_http_handler_set_host(3http)], xref:nng_http_handler_set_method.3http.adoc[nng_http_handler_set_method(3http)], xref:nng_http_handler_set_tree.3http.adoc[nng_http_handler_set_tree(3http)], -xref:nng_http_handler_set_tree.3http.adoc[nng_http_handler_set_tree_exclusive(3http)], xref:nng_http_server_add_handler.3http.adoc[nng_http_server_add_handler(3http)], xref:nng_strerror.3.adoc[nng_strerror(3)], xref:nng_aio.5.adoc[nng_aio(5)], diff --git a/docs/man/nng_http_handler_set_tree.3http.adoc b/docs/man/nng_http_handler_set_tree.3http.adoc index 821a5f7b..77b1cc59 100644 --- a/docs/man/nng_http_handler_set_tree.3http.adoc +++ b/docs/man/nng_http_handler_set_tree.3http.adoc @@ -1,6 +1,6 @@ = nng_http_handler_set_tree(3http) -// Copyright 2024 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> // Copyright 2020 Dirac Research <robert.bielik@dirac.com> // @@ -21,8 +21,6 @@ nng_http_handler_set_tree - set HTTP handler to match trees #include <nng/http.h> void nng_http_handler_set_tree(nng_http_handler *handler); - -void nng_http_handler_set_tree_exclusive(nng_http_handler *handler); ---- == DESCRIPTION @@ -31,27 +29,17 @@ The `nng_http_handler_set_tree()` function causes the _handler_ to be matched if by the client is a logical child of the path for _handler_, and no more specific _handler_ has been registered. -The `nng_http_handler_set_tree_exclusive()` function is similar to `nng_http_server_set_tree()` -with the distinction that the _handler_ will be considered to *exclusively* handle its request URI. -Unlike `nng_http_server_set_tree()`, it will not be possible to register additional -handlers in logical subdirectories of _handler_. - This is useful in cases when the handler would like to examine the entire path and possibly behave differently; for example a REST API that uses the rest of the path to pass additional parameters. -TIP: These methods are useful when constructing API handlers where a single +TIP: This function is useful when constructing API handlers where a single service address (path) supports dynamically generated children. - -TIP: The non-exclusive form is also useful for providing a default handler to be -generated when a more specific child does not exist. -This can provide a better experience for users than the standard 404 error -handling. +It can also provide a logical fallback instead of relying on a 404 error code. == SEE ALSO [.text-left] xref:nng_http_handler_alloc.3http.adoc[nng_http_handler_alloc(3http)], xref:nng_http_server_add_handler.3http.adoc[nng_http_server_add_handler(3http)], -xref:nng_http_get_method.3http.adoc[nng_http_get_method(3http)], -xref:nng.7.adoc[nng(7)] +xref:nng_http_get_method.3http.adoc[nng_http_get_method(3http)] diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md index cc3e76b9..9e35465b 100644 --- a/docs/ref/migrate/nng1.md +++ b/docs/ref/migrate/nng1.md @@ -349,7 +349,6 @@ They may silently truncate data. - [`nng_http_handler_set_host`] - [`nng_http_handler_set_method`] - [`nng_http_handler_set_tree`] -- [`nng_http_handler_set_tree_exclusive`] The HTTP handler objects may not be modified once in use. Previously this would fail with `NNG_EBUSY`. These checks are removed now, but debug builds will assert if an application tries to do so. |
