-
Bug
-
Resolution: Cannot Reproduce
-
None
-
1.20.1 Hotfix
-
On linux server with code writted with typescript with gulp to compile
-
Unconfirmed
The enum HttpRequestMethod don't work with the last version of @minecraft/server (1.5.0-BETA), with previous version (1.3.0) it's work, with the same package @minecraft/server-net;
Steps to Reproduce:
1. You just need to create ato write "const req = new mcnet.HttpRequest(uri);"
2. And after set the method "req.method = mcnet.HttpRequestMethod.POST"
3. And after execute it on the server
Observed Results:
We received a error message for the line "req.method = mcnet.HttpRequestMethod.POST"
Expected Results:
No error message and set the method work without problems.
I found a solution for the last version of the API but it's needed to do it in JavaScript like that:
const keys = Object.keys(mcnet.HttpRequestMethod);
const index = Object.keys(mcnet.HttpRequestMethod).indexOf("Post");
const value = Object.values(mcnet.HttpRequestMethod)[indexOfApple];
Thanks for your attention.