Concept: SoloLearn Autoliker | Code section
Here with another question, I'm a SL user. I'd like to discuss about SoloLearn Autoliker using AJAX. Without further ado, here is the concept: When you click thumbs up on a code written by somebody else, a POST request is sent to https://code.sololearn.com:443/CodeVoting/ with the parameters codeId and vote. The parameter codeId represents the unique ID number of the code you're about to like and the vote parameter represents number of votes (i.e always 1). Taking advantages of the Code Section being in the same domain sololearn.com, I simply coded a liker in JS in which if a viewer ran my code in web code section he/she would be in the thumbs up list without any interaction. Regardless of all this, the point of my question is that the JS code doesn't run if I execute my code in the android's code section with the console throwing a CORS exception. Can we tackle the problem and if not what are the reasons of the problem I encountered?. And well here is the code: <script> function autoLiker() { var xhttp = new XMLHttpRequest(); xhttp.open("POST", "https://code.sololearn.com:443/CodeVoting/", true); xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xhttp.send("codeId=1301436&vote=1"); } </script>