Wednesday, 20 April 2016

REST API in Salesforce

@RestResource(urlMapping = '/RESTApi/*')
global with sharing class sample{

@HttpGet global static Sobject processGet( ) {

       RestRequest req = RestContext.request;
        RestResponse res = RestContext.response;
       String strBody = req.requestBody.toString();



  }

  @HttpPost global static String processPost( ) {
 String strUri = RestContext.request.requestURI;


}
  @HttpPut global static String processPut() {
 String strUri = RestContext.request.requestURI;
}



}

No comments:

Post a Comment