httpserver: add method 'doHook' to callbacks.