bothy-sdk
    Preparing search index...

    Function gatewayUrl

    • Resolves Discovery.gateway.url against the API base and turns it into a WebSocket URL.

      Parameters

      • baseUrl: string

        The API base, for example https://example.com/api/v1.

      • url: string

        The gateway URL of the discovery (absolute, or relative to the base).

      Returns string

      The ws or wss URL without fragment.

      TypeError when the result would use clear text off the loopback host.

      gatewayUrl("https://example.com/api/v1", "/api/v1/gateway"); // "wss://example.com/api/v1/gateway"