import axios from 'axios'; | |
import { trbtoken, trburl } from '../dev-mode-javascript/config.js'; | |
async function TeraboxDownloader(url) { | |
const options = { | |
method: 'POST', | |
url: `${trburl}/fetch`, | |
headers: { | |
'x-rapidapi-key': trbtoken, | |
'x-rapidapi-host': trburl, | |
'Content-Type': 'application/json' | |
}, | |
data: { url: url } | |
}; | |
try { | |
const response = await axios.request(options); | |
console.log(response.data); | |
} catch (error) { | |
console.error(error); | |
return null; | |
} | |
} | |
export { TeraboxDownloader }; |