Correction – the REST API wasn’t exposed on Visualforce servers. From Summer ’13, it is!
With the result:
I need to do some more rigorous testing before I remove the call to the Ajax Proxy from forcetk.js, but I wanted to share this nugget today, since it’s immediately useful in answering this question on Salesforce StackExchange. In the meantime, if you want to give this a quick try with a Visualforce page that is using ForceTK, insert the following code after the call to
This should work – let me know in the comments if you encounter any problems!
UPDATE – here’s a Visualforce page that lets you execute arbitrary REST queries.