You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Http/Http.Extensions/src/RequestHeaders.cs
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -279,11 +279,27 @@ public Uri Referer
279
279
}
280
280
}
281
281
282
+
/// <summary>
283
+
/// Gets the value of header with <paramref name="name"/>.
284
+
/// </summary>
285
+
/// <remarks><typeparamref name="T"/> must contain a TryParse method with the signature <code>public static bool TryParse(string, out T)</code>.</remarks>
286
+
/// <typeparam name="T">The type of the header.
287
+
/// The given type must have a static TryParse method.</typeparam>
288
+
/// <param name="name">The name of the header to retrieve.</param>
289
+
/// <returns>The value of the header.</returns>
282
290
publicTGet<T>(stringname)
283
291
{
284
292
returnHeaders.Get<T>(name);
285
293
}
286
294
295
+
/// <summary>
296
+
/// Gets the values of header with <paramref name="name"/>.
297
+
/// </summary>
298
+
/// <remarks><typeparamref name="T"/> must contain a TryParseList method with the signature <code>public static bool TryParseList(IList<string>, out IList<T>)</code>.</remarks>
299
+
/// <typeparam name="T">The type of the header.
300
+
/// The given type must have a static TryParseList method.</typeparam>
301
+
/// <param name="name">The name of the header to retrieve.</param>
302
+
/// <returns>List of values of the header.</returns>
Copy file name to clipboardExpand all lines: src/Http/Http.Extensions/src/ResponseHeaders.cs
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -158,11 +158,27 @@ public IList<SetCookieHeaderValue> SetCookie
158
158
}
159
159
}
160
160
161
+
/// <summary>
162
+
/// Gets the value of header with <paramref name="name"/>.
163
+
/// </summary>
164
+
/// <remarks><typeparamref name="T"/> must contain a TryParse method with the signature <code>public static bool TryParse(string, out T)</code>.</remarks>
165
+
/// <typeparam name="T">The type of the header.
166
+
/// The given type must have a static TryParse method.</typeparam>
167
+
/// <param name="name">The name of the header to retrieve.</param>
168
+
/// <returns>The value of the header.</returns>
161
169
publicTGet<T>(stringname)
162
170
{
163
171
returnHeaders.Get<T>(name);
164
172
}
165
173
174
+
/// <summary>
175
+
/// Gets the values of header with <paramref name="name"/>.
176
+
/// </summary>
177
+
/// <remarks><typeparamref name="T"/> must contain a TryParseList method with the signature <code>public static bool TryParseList(IList<string>, out IList<T>)</code>.</remarks>
178
+
/// <typeparam name="T">The type of the header.
179
+
/// The given type must have a static TryParseList method.</typeparam>
180
+
/// <param name="name">The name of the header to retrieve.</param>
181
+
/// <returns>List of values of the header.</returns>
166
182
publicIList<T>GetList<T>(stringname)
167
183
{
168
184
returnHeaders.GetList<T>(name);
@@ -208,4 +224,4 @@ public void AppendList<T>(string name, IList<T> values)
0 commit comments