private static async Task <string> WriteContentAsync(ContentStream stream, IDictionary <string, string[]> headers, long maxLength) { var contentType = headers.ContainsKey(ContentType) ? headers[ContentType][0] : null ; return(await stream.ReadContentAsync(contentType, maxLength)); }