diff --git a/src/Http/Http.Extensions/src/RequestHeaders.cs b/src/Http/Http.Extensions/src/RequestHeaders.cs
index 12246922d4..94fa8149b9 100644
--- a/src/Http/Http.Extensions/src/RequestHeaders.cs
+++ b/src/Http/Http.Extensions/src/RequestHeaders.cs
@@ -279,11 +279,27 @@ namespace Microsoft.AspNetCore.Http.Headers
}
}
+ ///
+ /// Gets the value of header with .
+ ///
+ /// must contain a TryParse method with the signature public static bool TryParse(string, out T).
+ /// The type of the header.
+ /// The given type must have a static TryParse method.
+ /// The name of the header to retrieve.
+ /// The value of the header.
public T Get(string name)
{
return Headers.Get(name);
}
+ ///
+ /// Gets the values of header with .
+ ///
+ /// must contain a TryParseList method with the signature public static bool TryParseList(IList<string>, out IList<T>).
+ /// The type of the header.
+ /// The given type must have a static TryParseList method.
+ /// The name of the header to retrieve.
+ /// List of values of the header.
public IList GetList(string name)
{
return Headers.GetList(name);
diff --git a/src/Http/Http.Extensions/src/ResponseHeaders.cs b/src/Http/Http.Extensions/src/ResponseHeaders.cs
index 87e3c0318c..2feff2fe3c 100644
--- a/src/Http/Http.Extensions/src/ResponseHeaders.cs
+++ b/src/Http/Http.Extensions/src/ResponseHeaders.cs
@@ -158,11 +158,27 @@ namespace Microsoft.AspNetCore.Http.Headers
}
}
+ ///
+ /// Gets the value of header with .
+ ///
+ /// must contain a TryParse method with the signature public static bool TryParse(string, out T).
+ /// The type of the header.
+ /// The given type must have a static TryParse method.
+ /// The name of the header to retrieve.
+ /// The value of the header.
public T Get(string name)
{
return Headers.Get(name);
}
+ ///
+ /// Gets the values of header with .
+ ///
+ /// must contain a TryParseList method with the signature public static bool TryParseList(IList<string>, out IList<T>).
+ /// The type of the header.
+ /// The given type must have a static TryParseList method.
+ /// The name of the header to retrieve.
+ /// List of values of the header.
public IList GetList(string name)
{
return Headers.GetList(name);
@@ -208,4 +224,4 @@ namespace Microsoft.AspNetCore.Http.Headers
Headers.AppendList(name, values);
}
}
-}
\ No newline at end of file
+}