function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
nil.m.7nil.m.7 

can i use @HttpPut with two global static methods in same rest class

can i use @HttpPut with two global static methods in same rest class?

I am getting error like "@HttpPut already used elsewhere in class".

How to resolve this?

Vinita_SFDCVinita_SFDC

Hello,

A single Apex class annotated with @RestResource can't have multiple methods annotated with the same HTTP request method. For example, the same class can't have two methods annotated with @HttpPut.

Refer: http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_rest_methods.htm