Skip to content

Commit

Permalink
Accept JSON from API. Fixes developerforce#65
Browse files Browse the repository at this point in the history
  • Loading branch information
Pat Patterson committed May 28, 2015
1 parent b8c759e commit fcbb8a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion forcetk.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ if (forcetk.Client === undefined) {

var request = new XMLHttpRequest();
request.open("POST", (this.proxyUrl !== null && ! this.visualforce) ? this.proxyUrl: url, this.asyncAjax);


request.setRequestHeader('Accept', 'application/json');
request.setRequestHeader(this.authzHeader, "Bearer " + this.sessionId);
request.setRequestHeader('X-User-Agent', 'salesforce-toolkit-rest-javascript/' + this.apiVersion);
if (this.proxyUrl !== null && ! this.visualforce) {
Expand Down

0 comments on commit fcbb8a7

Please sign in to comment.