Documentation
    Preparing search index...

    Function combineUrlPath

    • Properly combines a base URL endpoint with a path, preserving any base path in the endpoint.

      Parameters

      • endpoint: string

        The base URL endpoint that may contain a path component

      • path: string

        The path to append to the endpoint (may include query parameters)

      • OptionalqueryParams: Record<string, string | undefined>

        Optional additional query parameters to append

      Returns string

      The properly combined URL string

      combineUrlPath("http://localhost:8787/rivet", "/actors/action")
      // Returns: "http://localhost:8787/rivet/actors/action"
      combineUrlPath("http://localhost:8787/rivet", "/actors?type=foo", { namespace: "test" })
      // Returns: "http://localhost:8787/rivet/actors?type=foo&namespace=test"