What is the purpose of the "path" in register_request_handler API call? #308
-
Looking at the request / response example. The value provided in the registered handler is "/random/text" but it's not used in the random_text_generator function. What is the purpose of path? It is a required parameter to register the handler, and presumably multiple requests / msgs could be received on the link, so I can't see it used as a request or msg type to aid in dispatching incoming requests to an appropriate handler. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
After I re-read the "Understanding Reticulum" path is described as a dot delimited naming scheme related to the optional aspect parameter. Not sure why your example uses '/' characters and the code uses the name path and not aspect. Am I getting these concepts mixed up? |
Beta Was this translation helpful? Give feedback.
-
You can think of the The purpose of the |
Beta Was this translation helpful? Give feedback.
You can think of the
path
argument as somewhat akin to the path component of an URI.The purpose of the
path
argument in theRequest
API is to allow you to create different request handlers, mapped to different logical namespaces.