File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ if (forcetk.Client === undefined) {
121121 */
122122 forcetk . Client . prototype . setSessionToken = function ( sessionId , apiVersion , instanceUrl ) {
123123 this . sessionId = sessionId ;
124- this . apiVersion = ( typeof apiVersion === 'undefined' || apiVersion == null )
124+ this . apiVersion = ( typeof apiVersion === 'undefined' || apiVersion === null )
125125 ? 'v21.0' : apiVersion ;
126126 if ( typeof instanceUrl === 'undefined' || instanceUrl == null ) {
127127 // location.hostname can be of the form 'abc.na1.visual.force.com' or
@@ -172,6 +172,7 @@ if (forcetk.Client === undefined) {
172172 xhr . setRequestHeader ( 'SalesforceProxy-Endpoint' , url ) ;
173173 }
174174 xhr . setRequestHeader ( that . authzHeader , "OAuth " + that . sessionId ) ;
175+ xhr . setRequestHeader ( 'X-User-Agent' , 'salesforce-toolkit-rest-javascript/' + that . apiVersion ) ;
175176 }
176177 } ) ;
177178 }
You can’t perform that action at this time.
0 commit comments