Discord
Login
Community
DARK THEME

Can microStudio get GET parameters from URL ?

How to get GET parameters in microscript ?

It is not possible from MicroScript to query any server on the Internet. The exception is when you add your own server to the game - see network options in the documentation.

What exactly do you want to do? You can try to write critical part of the code in JavaScript. Here's an example - which doesn't work - because the browser in the console returns the "Same Origin Policy" message and I don't know how to get around it.

https://microstudio.io/i/Loginus/get3/

You can try with "fetch".

example: https://microstudio.io/jkeks/newyear2024/AXBSERA3/?a=10&b=38920179

I want to get 'a' and 'b' variables with it values from request.

Reading data from a URL is only possible via JavaScript. Here is the code that will read all fields from the address and place them in the object.

https://microstudio.io/i/Loginus/get4/

https://microstudio.io/Loginus/get4/?GET=1234567890

windows.location returns the current address with all parameters. Check the url['search'] field - it should be what you want to read.

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community