It is my understanding that when Jesus said to his disciples, ” You have not because you ask not …” the request had to be made with the right motive which would be guided by being in the will of God. Due to my deficiency in omniscience, I can’t know what God’s will is for me in every situation of my life … I don’t know who around me will be affected by my choices (good or bad). I confess my sins and ask His forgiveness knowing He is faithful and just to cleanse me of all unrighteousness. I do that to remove any barrier that stands between God and me. Therefore when my prayers go unanswered, I have to assume that I was asking for something out of impure motives or asking for something that is not in line with His will and then I have to depend on the fact that He knows what is best for me. What if I asked for a snake believing it is a fish or a stone while thinking it was an egg? He, being the loving father that he is would not grant those requests. Am I wrong in that belief?
The passage you’re referring to is James 4:2-3
“You do not have, because you do not ask God. When you ask, you do not receive, because you ask with wrong motives, that you may spend what you get on your pleasures.”
The implication is that the prayer was for material gain and the wrong motives are selfishness and greed. I don’t believe it’s proper to apply this passage to prayers for healing because it’s always the Lord’s will that we be healed. Look at all he went through to make it possible. And in the only place in Scripture where He was asked if He was willing to heal a man, He answered, “I am willing” and immediately healed him. (Matt. 8:2-3)
In my opinion asking God for healing “if it’s your will” is an indication of the weakness of our faith. James also said that when we ask we must believe and not doubt (James 1:6) and that prayers offered in faith will make the sick person well (James 5:15) Attaching the condition of His will to our prayer is like saying that we’re not sure He’ll do it. The prayers I offer for healing include the phrase “according to the promise of Your Word” instead.
Here’s the promise. Isaiah 53:4-5 says He took up our infirmities (physical sickness) and our sorrows (physical pain) and by His wounds we are healed. Not can be or might be but we are healed. The Hebrew language clearly says that His death paid for our sins (our spiritual healing) but the awful beating he took beforehand was for our physical healing.