The royal official said to him, "Sir, come down before my child dies."
Jesus said to him, "You may go; your son will live."
The man believed what Jesus said to him and left.
There are 4 types of prayer: Praise, Contrition, Petition and Thanksgiving. Of these, I think petition is the most prevalent.
Whatever we ask in prayer, we are told to have faith. Many scripture passages say this. And yet many times, it seems that our petitions are not answered, even when we pray with faith.
We need to understand that our prayers are answered in God's time and His way. Not ours.
True faith is trusting that God's time and ways are what is best for us.