diff options
| author | Robert Bielik <robert.bielik@dirac.com> | 2020-01-28 07:43:09 +0100 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2020-01-27 22:43:09 -0800 |
| commit | 2545add6240145b419357b9260ae5e8c0d95ba6c (patch) | |
| tree | 155ae2ccfc4c720df7206c7fc81f68531624bc35 /docs/man/nng_http_handler_set_tree.3http.adoc | |
| parent | 9414a69a9575564d04022aef9bd898028e52bf09 (diff) | |
| download | nng-2545add6240145b419357b9260ae5e8c0d95ba6c.tar.gz nng-2545add6240145b419357b9260ae5e8c0d95ba6c.tar.bz2 nng-2545add6240145b419357b9260ae5e8c0d95ba6c.zip | |
Add possibility to explicitly set a tree handler as exclusive (#1158)
- Default tree handler behavior is now non-exclusive
- Add 'longest uri first' ordering for http handlers
Diffstat (limited to 'docs/man/nng_http_handler_set_tree.3http.adoc')
| -rw-r--r-- | docs/man/nng_http_handler_set_tree.3http.adoc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/man/nng_http_handler_set_tree.3http.adoc b/docs/man/nng_http_handler_set_tree.3http.adoc index fc26ec70..dd2731f8 100644 --- a/docs/man/nng_http_handler_set_tree.3http.adoc +++ b/docs/man/nng_http_handler_set_tree.3http.adoc @@ -2,6 +2,7 @@ // // Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> // Copyright 2018 Capitar IT Group BV <info@capitar.com> +// Copyright 2020 Dirac Research <robert.bielik@dirac.com> // // This document is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -21,6 +22,8 @@ nng_http_handler_set_tree - set HTTP handler to match trees #include <nng/supplemental/http/http.h> int nng_http_handler_set_tree(nng_http_handler *handler); + +int nng_http_handler_set_tree_exclusive(nng_http_handler *handler); ---- == DESCRIPTION @@ -29,7 +32,12 @@ The `nng_http_handler_set_tree()` function causes the _handler_ to be matched if the Request URI sent by the client is a logical child of the path for _handler_. -TIP: This method is useful when constructing API handlers where a single +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* handling its +Request URI. Other handlers will be tested against _handler_ when being added to a server, +possibly resulting in a URI conflict error. + +TIP: These methods are useful when constructing API handlers where a single service address (path) supports dynamically generated children. == RETURN VALUES |
