public static string ToAbsoluteUri(this string relativeUrl, IRequest req = null) { if (req == null) { req = HostContext.TryGetCurrentRequest(); } var absoluteUrl = HostContext.ResolveAbsoluteUrl("~/".CombineWith(relativeUrl), req); return(absoluteUrl); }
public static string ResolveBaseUrl(this IRequest httpReq) { return(HostContext.ResolveAbsoluteUrl("~/", httpReq)); }
public static string ResolveAbsoluteUrl(this IRequest httpReq, string url) { return(HostContext.ResolveAbsoluteUrl(url, httpReq)); }
public static string ResolveAbsoluteUrl(this IRequest httpReq, string virtualPath = null) { return(HostContext.ResolveAbsoluteUrl(virtualPath ?? "~".CombineWith(httpReq.RawUrl), httpReq)); }