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

HTTP Method 'GET' not allowed. Allowed are POST
Hi,
I am gettig this error on my RestResource class. I have just one method defined with annotation @HttpPost.
When client application calls this rest service, we ensure that it is sending POST request, not GET.
But still Salesforce compalins saying that HTTP Method 'GET' not allowed. Allowed are POST
Has anybody faced this error? any thoughts?
Thanks,
Bakul
I am gettig this error on my RestResource class. I have just one method defined with annotation @HttpPost.
When client application calls this rest service, we ensure that it is sending POST request, not GET.
But still Salesforce compalins saying that HTTP Method 'GET' not allowed. Allowed are POST
Has anybody faced this error? any thoughts?
Thanks,
Bakul
This is resolved. Either there is a mistake in the REST API cheatsheet or I just misunderstood it.
It indicates the Create/POST endpoint is /sobjects
when in fact it is /sobjects/my_custom_object__c
I had checked that.
But the problem I am facing is not with Salesforce REST APIs. I have my own REST API class where I am facing this problem.
I am just now sure, why salesforce treats a POST request as GET request?
Below is my REST SERVICE class.
Thanks,
Bakul