This repo is for STAT545 Homework 10 by Minzhi Liao.
Tried a few things including using RCurl
, API, POST
.
The scrape data part is here: scrape_data
The API queries part is here: api_queries
And the created issue is here: #2
After tried a few hours, finally I found the reason. So if you are reading this, REMEMBER DON'T use jsonlite::toJSON
to convert the post content to json because it produced something not supported by github.
The required JSON should be like this:
{"title":"This is a title", "body":"This is a body"}
But jsonlite::toJSON
produces somthing like this:
{"title":["This is a title"], "body":["This is a body"]}
This is not acceptable by github, and it waste me a lot of time. I'm adding a issue to that.