RustViaduct.sys.mjs

class RustViaduct.sys.BackendAlreadyInitialized()

BackendAlreadyInitialized

class RustViaduct.sys.BackendError()

BackendError

class RustViaduct.sys.BackendNotInitialized()

BackendNotInitialized

class RustViaduct.sys.Method()

HTTP Methods.

The supported methods are the limited to what’s supported by android-components.

class RustViaduct.sys.NetworkError()

NetworkError

class RustViaduct.sys.NonTlsUrl()

NonTlsUrl

class RustViaduct.sys.OhttpChannelNotConfigured()

OhttpChannelNotConfigured

class RustViaduct.sys.OhttpConfigFetchFailed()

OhttpConfigFetchFailed

class RustViaduct.sys.OhttpNotSupported()

OhttpNotSupported

class RustViaduct.sys.OhttpRequestError()

OhttpRequestError

class RustViaduct.sys.OhttpResponseError()

OhttpResponseError

class RustViaduct.sys.RequestHeaderError()

RequestHeaderError

class RustViaduct.sys.Response()

A response from the server.

RustViaduct.sys.Response.body

type: string

The body of the response.

RustViaduct.sys.Response.headers

type: Headers

The headers returned with this response.

RustViaduct.sys.Response.requestMethod

The method used to request this response.

RustViaduct.sys.Response.status

type: number

The HTTP Status code of this response.

RustViaduct.sys.Response.url

type: ViaductUrl

The URL of this response.

class RustViaduct.sys.SetBackendError()

SetBackendError

class RustViaduct.sys.UrlError()

Note: we return this if the server returns a bad URL with its response. This probably should never happen, but who knows.

RustViaduct.sys.allowAndroidEmulatorLoopback()

Allow non-HTTPS requests to the emulator loopback URL

RustViaduct.sys.initBackend(backend)

initBackend

Arguments:
  • backend (Backend)

RustViaduct.sys.setGlobalDefaultUserAgent(userAgent)

Set the global default user-agent

This is what’s used when no user-agent is set in the ClientSettings and no user-agent header is set in the Request.

Arguments:
  • userAgent (string)