Answer the question
In order to leave comments, you need to log in
How to correctly formulate a post request in http for gist github api?
I want to create a file in my Gist using the GitHub API. Now he is.
requests.post(
'https://api.github.com/gists',
params = {
'description':'Неоригинальное описание',
'public':True,
'files': {
'test.txt': {
'content':'Содержимое test.txt'
}
},
'access_token':'Мой токен'
}).json()
{'message': "Invalid request.\n\nFor 'links/0/schema', nil is not an object.", 'documentation_url': 'https://developer.github.com/v3/gists/#create-a-gist'}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question