Reputation: 2236
I want to create a file in my private Repo via the GitHub API.
https://developer.github.com/v3/repos/contents/#create-a-file
PUT /repos/:owner/:repo/contents/:path
I'm using Postman for testing and also already authorized via OAuth.
https://api.github.com/repos/user/reponame/contents/test.txt?message=Myfirstmessage&content=SGVsbG8gV29ybGQgaW4gQmFzZTY0IQ==
The error message is: "Problems parsing JSON"
But where exactly is the problem?
Upvotes: 0
Views: 1963
Reputation: 1765
I think you have to use choose file
from body / binary
. I've just had the same problem with creating an issue on github. Putting attributes in body / raw / json
solved the problem.
Upvotes: 3