Strange, 'inconsistent' API behavior

Hello there!

I just want to know if anyone else has experienced something like this. I have an application that makes an API request to /streams with a channel specification. The request should of course respond with any online streams specified in channel.

I’ve experienced that when I do a request /streams?channel=[channel]?limit=100 I get a response with an empty streams[] array, indicating that the channel is offline. It is not however, as I can clearly see the broadcast on the channel page. However, when I do a request like /streams?channel=[channel],null?limit=100 (adding a null or just any channel after [channel]), the API responds with a streams[] that contains the details of [channel] (the response that should appear without the added null). Furthermore, a query like /streams?channel=null,[channel]?limit=100 also returns an empty streams[] which I find incredibly strange.

I don’t know if I’m doing anything wrong with the API request but this definitely seems strange to me. In case anyone’s interested, the [channel] that exhibited this behavior was “Watchmeblink1”.

Maybe this was just a typo in your post but you should use and & to separate query string parameters and not ?.

Correct: /streams?channel=channel1&limit=100
Incorrect: /streams?channel=channel1?limit=100

1 Like

I definitely was not a typo, but just me being blind to the error! I’ve looked that request URL over and over without noticing it… I guess I should just read the documentation more closely next time.

Thank you so much! This also explains why the “bug” didn’t surface until after I had rewritten the Request module in my application.