Files
tiktok-dl/lib/fetch.ts
hansputera 3ac47e2983 bit changes
2021-11-15 15:28:52 +07:00

16 lines
290 B
TypeScript

import got, {ExtendOptions} from 'got';
export const fetch = got.extend({
prefixUrl: 'https://www.tiktok.com',
dnsCache: true,
});
export const getFetch = (baseUrl: string, options?: ExtendOptions) =>
got.extend({
prefixUrl: baseUrl,
dnsCache: true,
...options,
});