+ Start a Discussion
Arunkumar.RArunkumar.R 

How to call Restful @HttpGet method in visualforce page Urgent

Hi ,

I have a restful class with @HttpGet method, this method having soql query and it will return based on what we are sending as a parameter.

I need to implement this in visualforce page, visualforce page having one text box when user enter value in the text box those value should be passed into the @httpGet method, and that particular text box should return a result(Searched Item).

Please help me to this problem...!
Eli Flores, SFDC DevEli Flores, SFDC Dev
You might not need to go that far unless you are also expose it as a legit REST service. If it's just for the purpose doing a little AJAX specifically for that page, you can do that in plain visualforce and apex without the REST annotations. 

Check this out:
http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionRegion.html (http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionRegion.htm)


If you do need to use a legit rest callout, you'll have to use the HTTP & HTTPRequest objects:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_restful_http.htm