Table of Contents

Interface IUrlService

Namespace
Ando.Server.Services
Assembly
Ando.Server.dll

Service for generating application URLs.

public interface IUrlService

Methods

BuildUrl(string, HttpContext?)

Builds a full URL from a relative path.

string BuildUrl(string relativePath, HttpContext? httpContext = null)

Parameters

relativePath string

The relative path (e.g., "/auth/verify-email").

httpContext HttpContext

Optional HTTP context for development fallback.

Returns

string

The full URL.

GetBaseUrl(HttpContext?)

Gets the base URL for the application (e.g., "https://ci.example.com").

string GetBaseUrl(HttpContext? httpContext = null)

Parameters

httpContext HttpContext

Optional HTTP context for development fallback.

Returns

string

The base URL without trailing slash.