You need to sign in to do that
Don't have an account?

Restfull Api
Anyone help me. I send json object with webhook to /services/apexrest/myService/test, but i can't reseve them, my class is
But result after execute is System.NullPointerException: Attempt to de-reference a null object. I need send from woocommerce wordpress plugin with webhooks to salesforce. Anyone help me. Thanks :)
@RestResource(urlMapping='/myService/test/*') global class myWeb { @HttpGet global static void sayHello() { RestRequest request = RestContext.request; RestResponse response = RestContext.response; String accountId = request.requestURI.substring(request.requestURI.lastIndexOf('/')+1); System.debug(accountId); } }
But result after execute is System.NullPointerException: Attempt to de-reference a null object. I need send from woocommerce wordpress plugin with webhooks to salesforce. Anyone help me. Thanks :)
You might also want to consider getparameter function to get the parameter, rather than requestURI substring ?