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
Yogesh K MishraYogesh K Mishra 

How to send the only updated fields as a response body from the HTTP call in Apex?

How to send the only updated fields as a response body from the HTTP call in Apex? 

In HTTP call the GET always return all the fields, wherever PATCH return no content, and POST return only ID as a HTTP response.
Suppose I updated 2 fields so in the response of PATCH it should return 2 fields. How to achieve this?
ShirishaShirisha (Salesforce Developers) 
Hi Yogesh,

Greetings!

Hope you find this blog (https://www.sfdcstop.com/2019/11/salesforce-integration-tutorial-part-6.html) helpful which shows the raw response of the PATCH request.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri