The scripting language for Minecraft is Typescript. Lua would require a 3rd party mod.
https://learn.microsoft.com/en-us/minecraft/creator/scriptap...
>The @minecraft/server-net module contains types for executing HTTP-based requests. This module can only be used on Bedrock Dedicated Server. These APIs do not function within the Minecraft game client or within Minecraft Realms.