/// <summary>
 /// Takes an IHeaderDictionary objects and converts x: y format.
 /// </summary>
 /// <param name="objs"></param>
 /// <returns></returns>
 public static string ToHeaderString(this IHeaderDictionary objs)
 => objs.Aggregate(string.Empty, (current, obj) => current + $"{obj.Key}: {obj.Value};");
Ejemplo n.º 2
0
 private static string HeadersStringify(IHeaderDictionary headers)
 {
     return(headers.Aggregate("", (current, header) => current + string.Format("{0}: {1}\r\n", header.Key, string.Join("\r\n", header.Value))));
 }