I wanna update or create file (such as ~~.yml, ~~.json) with Github content API.
So I followed directions written in the github docs, it says to request PUT method for update or create. I wrote code like below, but I got 404 error,,
axios({
method: 'put',
url:
'https://api.github.com/repos/{owner}/{repo}/contents/package.json',
data: {
message: 'put method test',
content: { newData },
sha: { sha },
},
}).then((res) => console.log(res));
There is encoded code in the {content} btoa(content)