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
Hitesh chaudhariHitesh chaudhari 

delete record in httpget method

Hi 
As per my understanding in REST service  following annotation we can use
            @HttpGet     : get record read access only
            @HttpPost     : create new record
            @HttpDelete : Delete record
            @HttpPut     : upsert data
            @HttpPatch  : update data 

Can we  delete record in @HttpGet method() in REST call as HttpGet is just used to read record

Banwari KevatBanwari Kevat
Hi Yes,
  We can delete the record using delete statement.
Thanks,
Banwari
Hitesh chaudhariHitesh chaudhari
but it is allowed in REST call?? then why they created separate annotation