microsoft / microsoft/minecraft-scripting-samples
I have an error when I use the module "@minecraft/server-net"
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 241
- Forks
- 48
- Avg merge
- 17m
- Merged PRs (30d)
- 1
Description
I have this error:

However, I believe my code is correct.
here is my code:
import * as net from "@minecraft/server-net";
net.http.get("http://localhost/grush/views/index.php").then(r => {
event.sender.tell("body:"+r.body.length);
})
normally the query should return:
<?php
$data = ["a" => "b"];
header('Content-Type: application/json; charset=utf-8');
echo json_encode($data);
return an array with key "a" and value "b"
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the @minecraft/server-net import and the provided net.http.get example, then inspect the linked error screenshot and reproduce the issue in the Minecraft Bedrock scripting sample. Done means identifying the cause of the reported error and documenting a verified correction or required setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100