Interface IUrlService
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
relativePathstringThe relative path (e.g., "/auth/verify-email").
httpContextHttpContextOptional 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
httpContextHttpContextOptional HTTP context for development fallback.
Returns
- string
The base URL without trailing slash.