This way looks good to me. You cant call getData before handle request