I want to create a single POST method which takes method as a parameter along with the Request body. Using the parameter string method i'm trying to call the related method within my apex controller. But everytime I call this REST API using workbench and passing the method value i'm getting null value for method.
**
@RestResource(urlMapping='/AutomationSFEndPoint/*')
global without sharing class Automation_SFEndPoint{
@HttpPost
global static String handleMethod(string method){
if(method == 'Create_something'){
//have some logic
}
if(method == 'Create_somethingElse'){
//have some logic
}
}
}
//debug log for method is coming null every time
**
handleMethod
but remove the business logic. It might be returning null correctly.