2015-11-02 38 views
0

我想通過GitHub API在我的私人回購中創建一個文件。
https://developer.github.com/v3/repos/contents/#create-a-file400解析JSON的問題 - 使用OAuth的GitHub API和POSTMAN

PUT /repos/:owner/:repo/contents/:path 

我使用郵差進行測試,並已通過OAuth授權。

https://api.github.com/repos/user/reponame/contents/test.txt?message=Myfirstmessage&content=SGVsbG8gV29ybGQgaW4gQmFzZTY0IQ== 

的錯誤信息是: 「問題解析JSON」

但究竟哪裏出了問題?

Screenshot of my situation

回答

1

我認爲你必須使用choose filebody/binary。我在創建github上的問題時遇到了同樣的問題。將屬性放入body/raw/json解決了這個問題。