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:
2022-07-09 21:07:55 +07:00
parent 1b96f430e8
commit 23c7bda220
9 changed files with 1425 additions and 179 deletions

19
src/sdk.ts Normal file
View 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,
};