use EmptyIfNull
This commit is contained in:
parent
f2c110dad0
commit
bd18082e8b
|
@ -11,10 +11,9 @@ public static class HttpExtensions
|
||||||
{
|
{
|
||||||
var headers = req.Headers;
|
var headers = req.Headers;
|
||||||
return headers
|
return headers
|
||||||
.AllKeys
|
.AllKeys
|
||||||
.EmptyIfNull()
|
.EmptyIfNull()
|
||||||
.Where(k => k != null)
|
.Select(k => new HttpHeader(k!, headers[k]!));
|
||||||
.Select(k => new HttpHeader(k!, headers[k]!));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue