I was integrating a REST API of iCIMS and found some of the REST API calls need the http verb PATCH. However, it seems ColdFusion 10 doesn't support that. Is there any way around this?
Asked
Active
Viewed 1,293 times
2 Answers
7
Working with iCIMS API also here, but on CF 9, so no support for PATCH. But I did find that you can do a POST and then override that with an additional header: X-HTTP-Method-Override: PATCH
On iCIMS API, the PATCH method is required to update some data vs. a POST which creates a new entry. So something like the following should work.
<cfhttp method="post" url="api.icims.com/customers/1234/people/1289/fields/phones/332">
<cfhttpparam type="header" name="Authorization" value="Basic #auth_string#" >
<cfhttpparam type="header" name="X-HTTP-Method-Override" value="PATCH">
<cfhttpparam type="body" value="#your_json#" >
</cfhttp>

Matt W
- 71
- 1
- 2
-
Nice addition, +1. Welcome to SO :) – Leigh Sep 02 '15 at 16:42
-
Thanks. I forgot to mention that this was tested and verified with an Integration Specialist at iCIMS. – Matt W Sep 02 '15 at 17:55
1
This was not added until ColdFusion 11 update 3.
Most API services allow you to use POST instead of PATCH. From the docs for iCIMS it appears they accept either POST or PATCH as well.

Sean Coyne
- 3,864
- 21
- 24
-
I'm checking with that option only. I'm just curious to know that is there any way in CF10 to make a PATCH call. – Roul Feb 25 '15 at 07:15
-