You need to sign in to do that
Don't have an account?

Read POST request in Apex
Hi All,
To read the GET parameters from the URL, we use:
ApexPages.currentPage().getParameters().get(<name>);
How can I read POST parameters from the URL ?
Thanks,
Pragati
Hi,
I think you missunderstood what i said what i meant was if you put your parameters in url they can be handeled by get you can use post also below are the details
http://boards.developerforce.com/t5/Visualforce-Development/Re-Get-POST-data-via-visualforce-page/td-p/104987
All Answers
If you send parameters with URL they can be accessed by GET method only this is basic way of working of forms.
Hi Abhay,
Thanks for the quick response.
Is it mentioned somewhere in the salesforce documentation that Apex can only read GET parameters ?
Hi,
I think you missunderstood what i said what i meant was if you put your parameters in url they can be handeled by get you can use post also below are the details
http://boards.developerforce.com/t5/Visualforce-Development/Re-Get-POST-data-via-visualforce-page/td-p/104987
Hi Abhay,
Thanks for helping me out.
Now I understood that for reading parameters sent through GET or POST mechanism, we use the same code i.e ApexPages.currentPage().getParameters().get(<param name>);
But my client reported the issue that if he sends the request through GET instead of POST, system works fine. He would like to have the functionality working in POST call as well.
What could be the cause for this, any suggestions or ideas ?
Thanks,
Pragati
Do you have any example for post call ?
I dont have it right now. I will talk to my client for that.
Thanks a lot
Pragati
I have exposed my site page to external service which is make a POST request to my site page. I am able to get header and parameter values, how come I can get the body ?
Thanks in Advance,
Kuldeep