I'm having problems receiving a response for one of my REST requests.
Basically, my app is able to parse responses from URLs like this:
But when I add more to the request:
http://arkbroadcasting.com/rest/play_info.php?video=10&ads=0&prevFillers[]=2000
The debug console shows that I receive no response (not even an error message).
This is the code fragment in question:
' Form a standard request to the server
mediaLink = "http://arkbroadcasting.com/rest/play_info.php?video=" + calID + "&ads=" + adsID
' Include the last 10 filler video IDs in request
' Including this section of code causes requests to fail when the code is run:
'for i = 0 to fillerList.count() - 1
' mediaLink = mediaLink + "&prevFillers[]=" + fillerList[i]
'end for
' Send request to the server and decode response
mediaRequest = CreateObject("roUrlTransfer")
mediaRequest.SetURL(mediaLink)
data = ParseJson(mediaRequest.GetToString())
print "Video Request URL: " + mediaLink
print "Video Response: " + mediaRequest.getToString()
From my testing, it appears that there is a problem when I add &prevFillers[]=2000 (or the like) to the end of my request URL, but I'm not sure why, or how to resolve the problem. All other requests are served normally for me.
I think it has to do with having [ and ] in the request URL?
Thought I'd include the debug console fragment in question. The two print statements at the bottom of my fragment print these two lines in the first case:
Video Request URL: http://arkbroadcasting.com/rest/play_info.php?video=10&ads=0
Video Response: {"video":"0","filler":"1","filler_id":"7","filler_filename":"1357582161_GettingtoKnowBCF720p.mp4","ads":"0"}
And this in the second case:
Video Request URL: http://arkbroadcasting.com/rest/play_info.php?video=10&ads=0&prevFillers[]=2000
Video Response: