http-tunnel-client/src/sdk.ts

21 lines
363 B
TypeScript

const axios = require("axios");
const getTokenFree = async (baseUrl: string, data: any = {}) => {
const url = `${baseUrl}/__free__/api/get_token`;
return axios({
method: "POST",
url: url,
data: {
...data,
},
headers: {
"x-access-type": "FREE",
"Accept-Encoding": "identity",
},
});
};
export {
getTokenFree,
};