def hook(subdir, callback):
    if not http_servers:
        startServer()
    assert isinstance(http_servers, list)
    for server in http_servers:
        server.hook(subdir, callback)
Sets a callback for a given subdir.
dataset/ETHPy150Open ProgVal/Limnoria/src/httpserver.py/hook