rework sending response from server