chenos 4412efc145
feat(client,sdk): improve api client (#425)
* feat(client,sdk): improve api client

* feat: add test cases

* docs: update doc

* fix(sdk): cannot destructure property 'authClass' of 'instance' as it is undefined
2022-05-27 00:00:59 +08:00

11 lines
213 B
TypeScript

import { APIClient } from '@nocobase/client';
const apiClient = new APIClient({
baseURL: process.env.API_BASE_URL,
headers: {
'X-Hostname': window?.location?.hostname,
},
});
export default apiClient;