Ernst Robert
Ernst Robert

Reputation: 2236

400 Problems parsing JSON - GitHub API and POSTMAN using OAuth

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?

Screenshot of my situation

Upvotes: 0

Views: 1963

Answers (1)

wryrych
wryrych

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

Related Questions