[update!] quickchart.io is at least giving me a response now. however, it looks like this (i have emailed the owner of the website to see if there is anything that he can do for me on his end)
[UPDATE 2] - instead of using the CURL provided from the site. I converted the CURL into JSON per @jane’s suggestion. Then, I inject the JSON into the body of the POST.
Finally! I am now getting a shortened URL from the site. however, when i visit the shortened url, i am told that I am missing the ‘c’ or ‘chart’ variable.
this works. i got this code from an admin at quickchart
{“chart”: {“type”: “bar”, “data”: {“labels”: [“Hello”, “World”], “datasets”: [{“label”: “Foo”, “data”: [1, 2]}]}}}
but for some reason this does not.
{“chart”:{“type”: “line”, “data”: {“labels”: [“jan 1”,“jan 2”, “jan 3”], “datasets”: [{“label”: “cow”,“data”: [4,5,6], “fill”: “false”, “borderColor”:“red”}]},“options”: {“title”: {“display”: “true”, “text”: “Daily Behavioral Occurrence vs Non-Occurrence”}, “scales”: {“yAxes”: [{“scaleLabel”: {“display”: “true”, “labelString”:“Non-Occurrence / Occurrence”}, “ticks”:{“reverse”: “false”, “stepSize”:1}}]},},}}
the code from above does produce this in the live editor on the quickchart website but when i send the API POST demand i get the weird cloudfare message again.
this is from the quickchart.io website
(you’ll notice in the screenshot the lack of {“chart”:} as i use the website for live styling testing. however, i do include that in the API POST
It’s those dang fancy quotation marks that got me messed up. With the json requests, it will be vital to use the plain quotation marks. As such. I solved the issue using a JSON cleaner. https://jsonformatter.curiousconcept.com/