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

rest
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 :)
Hope you have append the account object id in the request URL .
like /services/apexrest/myService/test/Accountid .
Regards,
Ranjan
But my service works, i chek that on workbandch, i don't know how i can add security token od this. Whatever thanks very much.
Regards,
Dejan
You can try to use Post instead of Get method and paste parameters as an attributes, i.e.:
Hope this helps,
Lukasz