Hi, I am making a GET request to the OpenWeatherMap web server, a large JSON is received in response, everything is fine in the GD editor, but as soon as I export the application or at least run WIFI debugging, it gives an error, how to fix it?
https://openweathermap.org/ this maybe can be happening because you are calling to http instead of https, try to change the protocol over secure one https and try again.
I checked it from the start, not that
Well That is the message of the error saying the CORS Cross Origin policy is rejecting the request because of the security reasons, if you have your project hosted you can add the https://openweathermap.org/ domain into your .htaccess to grant CORS between your domain and the API domain.
Read more here
php - enable cors in .htaccess - Stack Overflow
What about the build for android?
the HTML5 version is understandable, but how do I get this to work in build on android? Maybe me need some kind of permission to do?
That I can no tell, read in the API documentation how other users do, think this you’re not the first person with this issue so go there and ask in the https://openweathermap.org/ something like
How to connect my APK game to the API
The error was in the “options” parameter, where we specify the content type, https://openweathermap.org/ do not yet support this parameter, I just left the “content type” field empty and received a response in json by default from the server … …