using System; using System.Net; namespace MediaBrowser.Api { /// /// Contains some helpers for the api /// public static class ApiService { /// /// Determines whether [is API URL match] [the specified URL]. /// /// The URL. /// The request. /// true if [is API URL match] [the specified URL]; otherwise, false. public static bool IsApiUrlMatch(string url, HttpListenerRequest request) { url = "/api/" + url; return request.Url.LocalPath.EndsWith(url, StringComparison.OrdinalIgnoreCase); } } }