Add a hook to server response