I am trying to work with github api to get access to raw README.md file using /repos/{owner}/{repo}/readme
, I am able to make the call using thunderclient in vscode and seeing the raw file.
but when I am making the same call from within my react application I am receiving a json object of this form
{
"name": "README.md",
"path": "README.md",
"sha": "...",
"size": 9,
"url": "https://api.github.com/repos/anubhavadarsh/Litaci/contents/README.md?ref=master",
"html_url": "https://github.com/anubhavadarsh/Litaci/blob/master/README.md",
"git_url": "https://api.github.com/repos/anubhavadarsh/Litaci/git/blobs/592c92302634be24522f96f3ed6649f389f1aa0d",
"download_url": "https://raw.githubusercontent.com/anubhavadarsh/Litaci/master/README.md",
"type": "file",
"content": "IyBMaXRhY2kKn",
"encoding": "base64",
"_links": {
"self": "https://api.github.com/repos/anubhavadarsh/Litaci/contents/README.md?ref=master",
"git": "https://api.github.com/repos/anubhavadarsh/Litaci/git/blobs/592c92302634be24522f96f3ed6649f389f1aa0d",
"html": "https://github.com/anubhavadarsh/Litaci/blob/master/README.md"
}
}
PS: I tried with a public repository that is not mine and I am able to get the raw readme, but my own repository still returns this.