What is the difference between QueryParameter and RequestParameter?

142    Asked by DanPeters in Salesforce , Asked on Aug 18, 2023

QueryParameter and RequesteParameter often seem the same with the same function. But I would like to know what is the difference between the two. 

Answered by dia shrinidhi

There is a very distinct difference between the RequestParameter and QueryParameter, even though they both look the same. When we talk about RequestParameter, we want to imply the part placed in the URL itself. Whereas, when we talk about the QueryParameter, we talk about the character in a URL. Even though the Request param vs. Query param seems to be vague, RequestParameter can return a QueryParameter.

You can take help from RequestParameter to get and read values from a form post. But a QueryParameter has nothing to do with the form values. It ignores the form values. Also, another difference between the two is that the RequestParameter can return more values compared to QueryParameters.

Your Answer


Parent Categories