VirtoCommerce.SwaggerApiClient.Client.ApiClient.SelectHeaderAccept C# (CSharp) Method

SelectHeaderAccept() public method

Select the Accept header's value from the given accepts array: if JSON exists in the given array, use it; otherwise use all of them (joining into a string)
public SelectHeaderAccept ( String accepts ) : String
accepts String The accepts array to select from.
return String
        public String SelectHeaderAccept(String[] accepts) {
            if (accepts.Length == 0)
                return null;
            if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase))
                return "application/json";
            return String.Join(",", accepts);
        }