use EmptyIfNull

This commit is contained in:
ig 2023-09-14 14:27:58 +02:00
parent f2c110dad0
commit bd18082e8b
1 changed files with 3 additions and 4 deletions

View File

@ -11,10 +11,9 @@ public static class HttpExtensions
{
var headers = req.Headers;
return headers
.AllKeys
.EmptyIfNull()
.Where(k => k != null)
.Select(k => new HttpHeader(k!, headers[k]!));
.AllKeys
.EmptyIfNull()
.Select(k => new HttpHeader(k!, headers[k]!));
}