File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed
rest-api/typescript-sdk/react-rest-api/src/thoughtspot-client Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 1- import { ThoughtSpotRestApi , createBearerAuthenticationConfig } from "@thoughtspot/rest-api-sdk" ;
1+ import {
2+ ThoughtSpotRestApi ,
3+ createBearerAuthenticationConfig ,
4+ } from "@thoughtspot/rest-api-sdk" ;
25import { THOUGHTSPOT_HOST } from "../constants" ;
36import { getCachedAuthToken } from "../get-auth-token" ;
47
58/**
69 * This will create a bearer authenticated client to connect to thoughtspot server
7- *
10+ *
811 * @returns ThoughtSpotRestApi
912 */
1013let thoughtSpotClient : ThoughtSpotRestApi ;
1114export const getThoughtSpotClient = ( ) => {
1215 if ( ! thoughtSpotClient ) {
13- const bearerConfig = createBearerAuthenticationConfig ( THOUGHTSPOT_HOST , getCachedAuthToken ) ;
16+ const bearerConfig = createBearerAuthenticationConfig (
17+ THOUGHTSPOT_HOST ,
18+ getCachedAuthToken ,
19+ {
20+ additionalHeaders : {
21+ "Accept-Language" : "en-US" ,
22+ } ,
23+ }
24+ ) ;
1425 thoughtSpotClient = new ThoughtSpotRestApi ( bearerConfig ) ;
1526 }
1627 return thoughtSpotClient ;
17- }
28+ } ;
You can’t perform that action at this time.
0 commit comments