API reference
Preparing search index…

HTTP/HTTPS client using one connection per request without automatically following redirects.

Source & inheritance
Member directory5

Constructors

Properties

Methods

Constructors

  • Set the server address; default to HTTP if no scheme is given. port 0 preserves the URL port or the protocol's default port.

    Parameters

    hostOptional
    string
    port
    number = 0
    typeOptional

    Returns

    Source & inheritance

Properties

Request: typeof HttpRequest = HttpRequest

HTTP request type.

Source & inheritance
Response: typeof HttpResponse = HttpResponse

HTTP response type.

Source & inheritance

Methods

  • Send a request snapshot asynchronously and return the complete response, with a body limit of 64 MiB.

    Parameters

    request

    Request contents.

    timeout
    ReadonlyValue = Time.Zero

    Total timeout; Time.Zero disables the timeout.

    verifyServer
    boolean = true

    Whether HTTPS verifies the server certificate; defaults to true.

    signalOptional
    AbortSignal

    Optional cancellation signal; cancellation returns ConnectionFailed.

    Returns

    Promise<HttpResponse>
    Source & inheritance
  • Set the server and optional IP address family, returning whether the address is valid; do not open a network connection.

    Parameters

    host
    string
    port
    number = 0
    typeOptional

    Returns

    boolean
    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0