ServiceStack.HttpRequestExtensions.HasAnyOfContentTypes C# (CSharp) Method

HasAnyOfContentTypes() public static method

public static HasAnyOfContentTypes ( this request ) : bool
request this
return bool
        public static bool HasAnyOfContentTypes(this IRequest request, params string[] contentTypes)
        {
            if (contentTypes == null || request.ContentType == null) return false;
            foreach (var contentType in contentTypes)
            {
                if (IsContentType(request, contentType)) return true;
            }
            return false;
        }