internal HttpCreationPayload GetInstanceCreationLinks() { string baseUrl = this.GetBaseUrl(); string instancePrefix = baseUrl + "/" + OrchestratorsControllerSegment + "{functionName}[/{instanceId}]"; string querySuffix = this.GetUniversalQueryStrings(); HttpCreationPayload httpCreationPayload = new HttpCreationPayload { CreateNewInstancePostUri = instancePrefix + "?" + querySuffix, CreateAndWaitOnNewInstancePostUri = instancePrefix + "?timeout={timeoutInSeconds}&pollingInterval={intervalInSeconds}&" + querySuffix, }; return(httpCreationPayload); }
internal HttpCreationPayload GetInstanceCreationLinks() { this.ThrowIfWebhooksNotConfigured(); Uri notificationUri = this.config.Options.NotificationUrl; string hostUrl = notificationUri.GetLeftPart(UriPartial.Authority); string baseUrl = hostUrl + notificationUri.AbsolutePath.TrimEnd('/'); string instancePrefix = baseUrl + OrchestratorsControllerSegment + "{functionName}[/{instanceId}]"; string querySuffix = !string.IsNullOrEmpty(notificationUri.Query) ? notificationUri.Query.TrimStart('?') : string.Empty; HttpCreationPayload httpCreationPayload = new HttpCreationPayload { CreateNewInstancePostUri = instancePrefix + "?" + querySuffix, CreateAndWaitOnNewInstancePostUri = instancePrefix + "?timeout={timeoutInSeconds}&pollingInterval={intervalInSeconds}&" + querySuffix, }; return(httpCreationPayload); }