REST API v3: Not able to create repo using the code given in the guide #24385
-
I used the code given here - https://developer.github.com/v3/guides/getting-started/#create-a-repository - to create a repo using REST API v3. But it errors out with a message |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Can you post your exact code or curl example (with OAuth tokens redacted) so we can see what you’re doing? Difficult to provide feedback without that. |
Beta Was this translation helpful? Give feedback.
-
@abinoda Heres the code -
The above code gets the parsing JSON error. But if I put everything in one line then the request works The one line code -
|
Beta Was this translation helpful? Give feedback.
-
Try this, I think it’s cleaner:
|
Beta Was this translation helpful? Give feedback.
-
@abinoda That worked, thx for the help. I think that the guide should be updated as this was not the only code that had the same error. |
Beta Was this translation helpful? Give feedback.
-
Can i pass parameters like “created_at” “updated_at” “pushed_at” ? It says problems parsing json, |
Beta Was this translation helpful? Give feedback.
-
For me it only works as single line after many tries |
Beta Was this translation helpful? Give feedback.
Try this, I think it’s cleaner: