Except this time instead of receiving JSON from the API I get an empty page. This goes without saying that it completely breaks the normal execution flow of my program and prevents me from getting more than about 180 clips from the channel, making my code completely useless as it doesn’t satisfy the job it was required to accomplish.
Why does it do that? Is your API broken? I suppose it is broken as normally I’d at least receive a JSON object saying null or error or something.
Can you show us the code you’re using to make the request? It’s working perfectly fine here and I’m getting all the results for that channel as normal.
Also, it would be helpful to know the exact response you’re getting when you say you get an empty response, what was the status code?
Last Edit: I was using “stripslashes” in my PHP code on the output returned by the API before converting it to a JSON object with “json_decode”, it seemed to work well for the first 2 requests but removing the “antislashes” in the last one prevented “json_decode” from making a correct object, thus making my code fail.
I am sorry for the trouble and thank you for your time and patience.
I didn’t need “stripslashes”, I just removed it.
Thank you very much for your help!
WX
Hello again,
I am using PHP and I make a curl request to the API.
The response is completely blank from the server and the status code is 200.
Here is the curl_getinfo dump from the “broken” request:
Edit: Again, the code works fine and the flow of execution is exactly the same as from the request I make in step #3 (from my original post), but it turns out that the last request I make (the one in #5) returns a completely blank page from the Twitch API when I give it the pagination “eyJiIjpudWxsLCJhIjp7IkN1cnNvciI6Ik1qQXcifX0”.
Note: this line: [“size_download”]=> float(51399) is what made me think that there was something wrong with my code, I was getting an empty response but the download size said otherwise, thank you Dist for pointing me in the right direction.
I’m not a PHP person, so I’ve no knowledge of “antislashes”, but from what I gather it removes backslash from the string. Which would explain why you had no issues with some pages of results, but as soon as you ran into a page with titles such as "title": "\"Hahahah ahaha I Did It hahahah\"", it would no longer be valid JSON if the backslashes were removed.