function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sapthagiri ReddySapthagiri Reddy 

APEX REST Basic Sample Code

While executing the APEX REST sample code available from the following link http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_rest_code_sample_basic.htm I got struck with the 3rd point "Create a file called account.txt to contain the data for the account you will create in the next step." The question is that where should this "account.txt" file be located and how is it supposed to be passed in the curl command line curl -H "Authorization: Bearer sessionId" -H "Content-Type: application/json" -d @account.txt "https://instance.salesforce.com/services/apexrest/Account/"
trsmithtrsmith
You'll want account.txt to exist in the same directory you are execuring the curl command from in your terminal. The option -d @account.txt is what passed the file in the curl command from the current directory.