RapdyScript API calls

20 views
Skip to first unread message

Harshit Singh

unread,
Mar 23, 2021, 8:33:35 AM3/23/21
to RapydScript

I want to consume the API of a website using Rapydscript and convert the returned result to JavaScript. Can we do that as we do it in Python?

The issue here is that I want to make an API call through my javascript but getting a CORS exception. Please suggest if there are any other ways to do it instead of Rapydscript. I have tried XMLhttp method and Ajax but no success there as well.



Alexander Tsepkov

unread,
Mar 23, 2021, 8:42:54 AM3/23/21
to RapydScript
The symptoms you describe sound like misuse of whatever the API is (it's not clear from the context) and have nothing to do with RapydScript. If you're seeing CORS issue in RS, you will be seeing the same issue in pure JavaScript. Typically browsers care about CORS, other environments do not, which leads me to believe that you're trying to compare a Python script from the terminal (which probably doesn't care about CORS) vs code executed in the browser (which does). That's all I can guess given the limited context provided in your question.
Reply all
Reply to author
Forward
0 new messages