Closed musso closed 2 years ago
I will probably fix this in stable release. I'm planning to just use node-fetch
for the HTTP client, so my code will requires some refactoring
This should be fixed in v1, but if the issue still persists, fill free to reopen the issue.
The way to do this on v1
:
import { Client } from "youtubei";
const client = new Client({
fetchOptions: {
headers: {
example: "abc",
},
},
});
client.search("foo");
(Also check the v1 migration guide)
Currently, the
new Client()
allows to pass a customrequestOptions
to construct the request object, however, it is not used inget
andpost
request insrc/common/HTTP.ts
.