本文介绍了解析JSON的400个问题-使用OAuth的GitHub API和POSTMAN的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过GitHub API在我的私有仓库中创建一个文件. developer.github/v3/repos/contents /#create-a-file
I want to create a file in my private Repo via the GitHub API. developer.github/v3/repos/contents/#create-a-file
PUT /repos/:owner/:repo/contents/:path我正在使用Postman进行测试,并且已经通过OAuth进行了授权.
I'm using Postman for testing and also already authorized via OAuth.
api.github/repos/user/reponame/contents/test.txt?message=Myfirstmessage&content=SGVsbG8gV29ybGQgaW4gQmFzZTY0IQ==错误消息是:问题解析JSON"
The error message is: "Problems parsing JSON"
但是问题到底出在哪里?
But where exactly is the problem?
推荐答案
我认为您必须使用body / binary中的choose file.我在github上创建问题时遇到了同样的问题.将属性放在body / raw / json中可以解决此问题.
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.
更多推荐
解析JSON的400个问题
发布评论