adding the hooks to mock request call and mock callback call