Script API - v1.21.90.25
    Preparing search index...

    Module @minecraft/server-net - v1.0.0-betaBeta

    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.

    Manifest Details

    {
    "module_name": "@minecraft/server-net",
    "version": "1.0.0-beta"
    }

    @minecraft/common (Optional in Manifest Details)

    • Requires v1.0.0 or above
    {
    "module_name": "@minecraft/common",
    "version": "1.0.0"
    }

    @minecraft/server (Required one of the following in Manifest Details)

    • Requires v1.17.0 up to, but not including, v2.0.0
    {
    "module_name": "@minecraft/server",
    "version": "1.17.0"
    }
    • Requires v2.0.0 up to, but not including, v3.0.0
    {
    "module_name": "@minecraft/server",
    "version": "2.0.0"
    }

    @minecraft/server-admin (Required in Manifest Details)

    • Requires v1.0.0-beta or above
    {
    "module_name": "@minecraft/server-admin",
    "version": "1.0.0-beta"
    }

    Install type definition for @minecraft/server-net module using npm:

    npm i @minecraft/server-net@1.0.0-beta.1.21.90-preview.25
    

    Enumerations

    HttpRequestMethod
    PacketId

    Represents the unique type of network packet.

    Classes

    HttpClient
    HttpHeader

    Represents an HTTP header - a key/value pair of meta-information about a request.

    HttpRequest

    Main object for structuring a request.

    HttpResponse

    Main object that contains result information from a request.

    InternalHttpRequestError

    An error thrown when a platform-level HTTP error occurs. Information provided in this class may be useful for diagnostics purposes but will differ from platform to platform.

    MalformedHttpRequestError

    An error thrown when a malformed HTTP request is attempted to be sent.

    NetworkBeforeEvents
    PacketReceiveBeforeEventSignal
    PacketReceivedBeforeEvent

    Sent as the server receives a network packet from a client. If cancelled, the server will not parse the network packet and will silently ignore it.

    PacketSendBeforeEvent

    Sent as the server sends a network packet to clients. If cancelled, the server will not send the network packet to the receiving clients.

    PacketSendBeforeEventSignal

    Interfaces

    PacketEventOptions

    Options for events triggered by network packets.

    Variables

    beforeEvents
    http