I am using GitHub API to fetch file from repo:
const octokit = new Octokit({
auth: "*******************************",
});
const response = await octokit.request(
"GET /repos/owner/repo/contents/path",
{
owner: "owner",
repo: "repo",
path: "path",
}
);
but I am getting response in base64 format.
I need to add header Accept: application/vnd.github.VERSION.raw
.
Is there a way to add headers in Octokit request?