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
bujjibujji 

PATCH method from HTTP Request

Hi Guys,

I have to update third party using HTTP PATCH method, but in apex class HTTP Request is not allowing me to send a request using req.setMethos('PATCH'). Is there any way that i can send PATCH request to third party system from apex class. Please give me some ideas.

Thanks.
pconpcon
It appears that Salesforce does not support the PATCH method for HTTP callouts.  There are some proposed workarounds [1] [2] but none of them are particularly good.  Probably your best bet would be to figure out if you can do the callout as a POST instead of PATCH.  You could always file an Idea on the Idea Exchange [3] for Apex to support PATCH.

[1] http://salesforce.stackexchange.com/questions/57215/how-can-i-make-a-patch-http-callout-from-apex
[2] http://salesforce.stackexchange.com/questions/13294/patch-request-using-apex-httprequest
[3] https://success.salesforce.com/ideaPost
NZArchitectNZArchitect

Salesforce does now support (Winter 21)

inbound PATCH requests, and

outbound PATCH callouts.