MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / add_hook

Method add_hook

thirdparty/bottle/bottle.py:662–676  ·  view source on GitHub ↗

Attach a callback to a hook. Three hooks are currently implemented: before_request Executed once before each request. The request context is available, but no routing has happened yet. after_request Executed once after each re

(self, name, func)

Source from the content-addressed store, hash-verified

660 return dict((name, []) for name in self.__hook_names)
661
662 def add_hook(self, name, func):
663 """ Attach a callback to a hook. Three hooks are currently implemented:
664
665 before_request
666 Executed once before each request. The request context is
667 available, but no routing has happened yet.
668 after_request
669 Executed once after each request regardless of its outcome.
670 app_reset
671 Called whenever :meth:`Bottle.reset` is called.
672 """
673 if name in self.__hook_reversed:
674 self._hooks[name].insert(0, func)
675 else:
676 self._hooks[name].append(func)
677
678 def remove_hook(self, name, func):
679 """ Remove a callback from a hook. """

Callers 1

decoratorMethod · 0.95

Calls 2

insertMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected