added beforeSend/afterSend callback for response widget