Skip to content

Commit fcbb8a7

Browse files
author
Pat Patterson
committed
Accept JSON from API. Fixes developerforce#65
1 parent b8c759e commit fcbb8a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

forcetk.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,8 @@ if (forcetk.Client === undefined) {
292292

293293
var request = new XMLHttpRequest();
294294
request.open("POST", (this.proxyUrl !== null && ! this.visualforce) ? this.proxyUrl: url, this.asyncAjax);
295-
295+
296+
request.setRequestHeader('Accept', 'application/json');
296297
request.setRequestHeader(this.authzHeader, "Bearer " + this.sessionId);
297298
request.setRequestHeader('X-User-Agent', 'salesforce-toolkit-rest-javascript/' + this.apiVersion);
298299
if (this.proxyUrl !== null && ! this.visualforce) {

0 commit comments

Comments
 (0)