Пример #1
0
            /// <summary>
            /// Set the HTTP client to use.
            /// </summary>
            /// <param name="client">The HttpClient to use</param>
            /// <returns>Updated builder.</returns>
            public Builder SetHttpClient(HttpClient client)
            {
                if (client is null)
                {
                    throw new ArgumentNullException(nameof(client));
                }

                _context = HttpContextModule.withHttpClient(client, _context);
                return(this);
            }
Пример #2
0
 /// <summary>
 /// Create Client builder.
 /// </summary>
 /// <param name="httpClient">Optional HttpClient to use for HTTP requests.</param>
 public Builder(HttpClient httpClient = null)
 {
     _context = httpClient == null ? _context : HttpContextModule.withHttpClient(httpClient, _context);
 }