Add before hooks to stub requests.