diff --git a/Sming/Components/Network/src/Network/Http/HttpResourceTree.h b/Sming/Components/Network/src/Network/Http/HttpResourceTree.h index fb7aee3370..699396e35d 100644 --- a/Sming/Components/Network/src/Network/Http/HttpResourceTree.h +++ b/Sming/Components/Network/src/Network/Http/HttpResourceTree.h @@ -59,6 +59,15 @@ class HttpResourceTree : public ObjectMap using ObjectMap::set; + template + HttpResource* set(const String& path, HttpResource* resource, HttpResourcePlugin* plugin, Tail... plugins) + { + registerPlugin(plugin, plugins...); + set(path, resource); + resource->addPlugin(plugin, plugins...); + return resource; + } + /** * @brief Set a callback to handle the given path * @param path URL path