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

Cannot call APEX REST POST method which was working before
Hi,
I have the following APEX rest method:
@RestResource(urlMapping='/TestService/*')
global with sharing class TestService {
@HttpPost
global static String Scheduler() {
return 'TEST';
}
}
When I try to call it with:
curl -X POST -H "X-PrettyPrint:1" -H "Content-Type:application/x-www-form-urlencoded" -k "https://na12-api.salesforce.com/services/apexrest/TestService/Scheduler?schedule=1&hour=22&minute=48" -H "Authorization: Bearer SESSION_ID"
It returns the following error message:
[ {
"message" : "An unexpected error occurred. Please include this ErrorId if you
contact support: 330346244-51980 (863387990)",
"errorCode" : "UNKNOWN_EXCEPTION"
} ]
when I change ti to @HttpGet and I call it with curl -X GET -H "X-PrettyPrint:1" -H "Content-Type:application/x-www-form-urlencoded" -k "https://na12-api.salesforce.com/services/apexrest/TestService/Scheduler?schedule=1&hour=22&minute=48" -H "Authorization: Bearer SESSION_ID"
I get the expected result.
Any help will be appreciated.
Thanks,
Kzmp