add request response hook to rest example