Add beforeSendResponse event