handleFetchHook / handleXhrHook See Instrumentation hooks: both instrument network traffic and return a restore function.