websUrlHandlerDelete | GoAhead WebServer API | GoAhead EMF |
Delete an existing URL handler
#include "webs.h" int websUrlHandlerDelete(int (*fn)(webs_t wp, char_t *handler, char_t *path, char_t *query), int flags);
wp | Web server connection handle |
url | Request URL |
path | Request path portion of the URL |
query | Query string portion of the URL |
flags | Specify a sorting value to modify the calling order of the handler |
The websUrlHandlerDelete procedure is used to delete existing URL handlers. This is useful when you wish to replace a URL handler with a new version, such as replacing the security handler.
If multiple handlers have been defined for one function, only the first encountered will be removed.
Returns 0 if successful. Otherwise returns -1 if the handler was not found.
int myHandler(webs_t wp, char_t *url, char_t *path, char_t *query) { /* * Processing here */ return 1; } websUrlHandlerDelete("", myHandler, WEBS_HANDLER_FIRST);