rest-vir - v1.7.0
    Preparing search index...

    Function buildEndpointUrl

    • Creates and finalizes a URL for sending fetches to the given endpoint.

      Type Parameters

      • const EndpointToFetch extends
            | typeof NoParam
            | Readonly<
                {
                    methods: _RequireAtLeastOne<Record<HttpMethod, boolean>, HttpMethod>;
                    path: `/${string}`;
                    requestDataShape: Shape | undefined;
                    responseDataShape: Shape | undefined;
                    searchParamsShape: Shape<unknown> | undefined;
                    service: { serviceName: any; serviceOrigin: string };
                },
            > = typeof NoParam

      Parameters

      • endpoint: EndpointToFetch extends EndpointDefinition
            ? EndpointToFetch
            : {
                methods: _RequireAtLeastOne<Record<HttpMethod, boolean>, HttpMethod>;
                path: `/${string}`;
                requestDataShape: Shape | undefined;
                responseDataShape: Shape | undefined;
                searchParamsShape: Shape<unknown> | undefined;
                service: { serviceName: any; serviceOrigin: string };
            }
      • __namedParameters: Pick<
            EndpointToFetch extends NoParam
                ? Readonly<GenericFetchEndpointParams>
                : Readonly<FetchEndpointParams<Exclude<EndpointToFetch, NoParam>>>,
            "pathParams" | "searchParams" | "wildcard",
        >

      Returns string