Skip to content

Commit 336aa49

Browse files
author
Pat Patterson
committed
Use ?_HttpMethod=PATCH for update, rather than custom PATCH method, for wider compatibility
1 parent 2b59448 commit 336aa49

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

forcetk.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ if (forcetk.Client === undefined) {
270270
* @param [error=null] function to which jqXHR will be passed in case of error
271271
*/
272272
forcetk.Client.prototype.update = function(objtype, id, fields, callback, error) {
273-
this.ajax('/' + this.apiVersion + '/sobjects/' + objtype + '/' + id
274-
, callback, error, "PATCH", JSON.stringify(fields));
273+
this.ajax('/' + this.apiVersion + '/sobjects/' + objtype + '/' + id
274+
+ '?_HttpMethod=PATCH', callback, error, "POST", JSON.stringify(fields));
275275
}
276276

277277
/*

0 commit comments

Comments
 (0)