Curl command
curl --user "github" --request POST --data '{"description":"Created via API","public":"true","files":{"587":{"content":"adasdaskdasjsadsasdjfcsdjsdjcsdjcsdjcsdjcfsdjsdjfjsdfjsdfsdfsjdfmdsfdsf"}}' https://api.github.com/gists
It then asks for password and gist is created.
This gives a JSON Error:
url = 'https://api.github.com/gists'
auth = ('github','password')
requests.post(url,auth=auth,data={
"description": "the description for this gist",
"public": False,
"files": {
"file1.txt": {
"content": "String file contents"
}
}
})
Error: {"message":"Problems parsing JSON","documentation_url":"https://developer.github.com/v3"}
Any ideas where my request is going wrong ?