Hadith 6107
He said: God's messenger came upon me when I had a complaint and was saying, "O God, if my appointed time has come grant me rest, if it is to be delayed grant me abundant means of subsistence, but if this is a testing grant me endurance." God's messenger asked him how he had expressed himself, and when he repeated to him what he had said, he gave him a kick and said, "O God, heal him," or, "cure him. The transmitter was doubtful about the exact words. He said that he did not afterwards complain of his pain. Tirmidhi transmitted it, saying this is a hasan sahih tradition.
وَعَنْهُ قَالَ: كُنْتُ شَاكِيًا فَمَرَّ بِي رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ وَأَنَا أَقُولُ: اللَّهُمَّ إِنْ كَانَ أَجَلِي قَدْ حَضَرَ فَأَرِحْنِي وَإِن كَانَ متأخِّراً فارفَعْني وَإِنْ كَانَ بَلَاءً فَصَبِّرْنِي. فَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «كَيْفَ قُلْتَ؟» فَأَعَادَ عَلَيْهِ مَا قَالَ فَضَرَبَهُ بِرِجْلِهِ وَقَالَ: «اللَّهُمَّ عَافِهِ - أَوِ اشْفِهِ -» شَكَّ الرَّاوِي قَالَ: فَمَا اشْتَكَيْتُ وَجَعِي بَعْدُ. رَوَاهُ التِّرْمِذِيُّ وَقَالَ: هَذَا حَدِيثٌ حَسَنٌ صَحِيحٌ