Notes
HTTP Post Method (@HTTPPost
)
@RestResource(urlMapping='/Account/*')
global class RestCaseController {
@HTTPPost
global static String createNewAccount(String acName){
Account ac = new Account();
ac.Name=acName;
insert ac;
return 'New Account Created';
}
}
We need to pass a parameter through Workbench: