Class UrlUtility
- Namespace
- ComponentSpace.Saml2.Utility
- Assembly
- ComponentSpace.Saml2.dll
Provides URL utility methods.
public class UrlUtility : IUrlUtility
- Inheritance
-
UrlUtility
- Implements
- Inherited Members
Constructors
UrlUtility(IHttpRequest, ILoggerFactory)
Initializes a new instance of the UrlUtility class.
public UrlUtility(IHttpRequest request, ILoggerFactory loggerFactory)
Parameters
requestIHttpRequestThe HTTP request.
loggerFactoryILoggerFactoryThe logger factory.
Methods
AppendPath(string, string)
Appends a path to the URL.
public string AppendPath(string url, string path)
Parameters
Returns
- string
The combined URL and path.
IsAbsoluteUrl(string)
Indicates whether the URL is absolute.
public bool IsAbsoluteUrl(string url)
Parameters
urlstringThe URL.
Returns
- bool
trueif the URL is absolute; otherwisefalse.
LogRequest()
Logs the HTTP request.
public void LogRequest()
ToAbsoluteUrl(string)
Converts a relative URL to an absolute URL.
public string ToAbsoluteUrl(string url)
Parameters
urlstringThe relative URL.
Returns
- string
The absolute URL.
ToHttpsUrl(string)
Converts an HTTPS URL to an HTTPS URL.
public string ToHttpsUrl(string url)
Parameters
urlstringThe HTTP URL.
Returns
- string
The HTTPS URL.