@@ -72,14 +72,29 @@ public static IConfiguration WithStandardDownload(this IConfiguration configurat
72
72
/// <param name="configuration">The configuration to use.</param>
73
73
/// <returns>The new configuration.</returns>
74
74
public static IConfiguration WithRequesters ( this IConfiguration configuration ) =>
75
- configuration . WithRequesters ( new HttpClientHandler { UseCookies = false , AllowAutoRedirect = false } ) ;
75
+ configuration . WithRequesters ( new HttpClientHandler ( ) ) ;
76
+
77
+ /// <summary>
78
+ /// Adds the requesters from the AngleSharp.Io package.
79
+ /// </summary>
80
+ /// <param name="configuration">The configuration to use.</param>
81
+ /// <param name="httpClientHandler">
82
+ /// The HTTP client handler to use for sending requests.
83
+ /// </param>
84
+ /// <returns>The new configuration.</returns>
85
+ public static IConfiguration WithRequesters ( this IConfiguration configuration , HttpClientHandler httpClientHandler )
86
+ {
87
+ httpClientHandler . UseCookies = false ;
88
+ httpClientHandler . AllowAutoRedirect = false ;
89
+ return configuration . WithRequesters ( ( HttpMessageHandler ) httpClientHandler ) ;
90
+ }
76
91
77
92
/// <summary>
78
93
/// Adds the requesters from the AngleSharp.Io package.
79
94
/// </summary>
80
95
/// <param name="configuration">The configuration to use.</param>
81
96
/// <param name="httpMessageHandler">
82
- /// The HTTP handler stack to use for sending requests.
97
+ /// The HTTP message handler to use for sending requests.
83
98
/// </param>
84
99
/// <returns>The new configuration.</returns>
85
100
public static IConfiguration WithRequesters ( this IConfiguration configuration , HttpMessageHandler httpMessageHandler )
0 commit comments