2022-11-11 09:25:29 +07:00
|
|
|
const axios = require("axios");
|
2022-06-25 21:38:09 +07:00
|
|
|
|
2022-07-09 21:17:08 +07:00
|
|
|
const getTokenFree = async (baseUrl: string, data: any = {}) => {
|
2022-06-26 14:28:37 +07:00
|
|
|
const url = `${baseUrl}/__free__/api/get_token`;
|
2022-06-25 21:38:09 +07:00
|
|
|
return axios({
|
|
|
|
method: "POST",
|
|
|
|
url: url,
|
|
|
|
data: {
|
|
|
|
...data,
|
|
|
|
},
|
|
|
|
headers: {
|
|
|
|
"x-access-type": "FREE",
|
2022-11-30 12:17:30 +07:00
|
|
|
"Accept-Encoding": "identity",
|
2022-06-25 21:38:09 +07:00
|
|
|
},
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
2022-07-09 21:17:08 +07:00
|
|
|
export {
|
2022-06-25 21:38:09 +07:00
|
|
|
getTokenFree,
|
|
|
|
};
|