@@ -95,19 +95,20 @@ class webserver
9595 **/
9696 bool is_running ();
9797 /* *
98- * Method used to registrate a resource to the webserver.
98+ * Method used to register a resource with the webserver.
9999 * @param resource The url pointing to the resource. This url could be also parametrized in the form /path/to/url/{par1}/and/{par2}
100100 * or a regular expression.
101101 * @param http_resource http_resource pointer to register.
102102 * @param family boolean indicating whether the resource is registered for the endpoint and its child or not.
103+ * @return true if the resource was registered
103104 **/
104105 template <typename T>
105- void register_resource (const std::string& resource,
106+ bool register_resource (const std::string& resource,
106107 http_resource<T>* res, bool family = false
107108 )
108109 {
109110 details::http_resource_mirror hrm (res);
110- register_resource (resource, hrm, family);
111+ return register_resource (resource, hrm, family);
111112 }
112113
113114 void unregister_resource (const std::string& resource);
@@ -201,8 +202,8 @@ class webserver
201202 validator_ptr validator;
202203 unescaper_ptr unescaper;
203204 const struct sockaddr * bind_address;
204- /* Changed type to MHD_socket because this type will always reflect the
205- platform's actual socket type (e.g. SOCKET on windows, int on unixes)*/
205+ /* Changed type to MHD_socket because this type will always reflect the
206+ platform's actual socket type (e.g. SOCKET on windows, int on unixes)*/
206207 MHD_socket bind_socket;
207208 const int max_thread_stack_size;
208209 const bool use_ssl;
0 commit comments