Add beforeSendResponse event

Add beforeSendResponse event