Task: Upgrading the http tunnel client to typescript language and updated the response and request models and updated the types
This commit is contained in:
19
src/sdk.ts
Normal file
19
src/sdk.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
const axios = require("axios").default;
|
||||
|
||||
const getTokenFree = async (baseUrl, data = {}) => {
|
||||
const url = `${baseUrl}/__free__/api/get_token`;
|
||||
return axios({
|
||||
method: "POST",
|
||||
url: url,
|
||||
data: {
|
||||
...data,
|
||||
},
|
||||
headers: {
|
||||
"x-access-type": "FREE",
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
getTokenFree,
|
||||
};
|
||||
Reference in New Issue
Block a user