mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2024-11-22 15:47:30 +00:00
14 lines
304 B
JavaScript
14 lines
304 B
JavaScript
/** @type {import("node-fetch").default} */
|
|
// @ts-ignore
|
|
const fetch = require("node-fetch")
|
|
|
|
function request(url, options = {}) {
|
|
if (!options.headers) options.headers = {}
|
|
options.headers = {
|
|
"user-agent": "CloudTubeBackend/1.0"
|
|
}
|
|
return fetch(url, options)
|
|
}
|
|
|
|
module.exports.request = request
|