Hello,
We are having troubles with “Network.request()” function. I’ve tried in different versions of coronasdk including the latest daily build.
The following code doesn’t work fine on Android (and it works perfecly on iOS):
local base\_url = "mysite.com" local url = base\_url .. "/wp-json/posts?filter[posts\_per\_page]=20" .. "&filter[category\_name]=category" local params = {} params.progress = true params.timeout = 40 network.download( url, "GET", options.listenerFunction, params, targetFilePath, options.target\_baseDirectory )
I’m sending a request to an API.
When running on iOS (or in the simulator) I’m getting the correct results because the App is making the request to the correct url:
"mysite.com/wp-json/posts?filter[posts_per_page]=20&filter[category_name]=category"
But when running on Android devices, I’m getting the results equivalent to:
"mysite.com/wp-json/posts?filter[posts_per_page]=20"
Which means that network.request on Android is not understanding the complete URL with two queries.
If I change the url to
**"mysite.com/wp-json/posts?filter[category_name]=category&****filter[posts_per_page]=20 **"
On android I get the results equivalent to:
"mysite.com/wp-json/posts?filter[category_name]=category"
So its clear that there is a bug on Android ignoring what comes after the “&”.