Is there anyway to run code BEFORE performing requests?

Original message was deleted