/// <summary> /// Initializes a new instance of the <see cref="InfosetClient"/> class. /// </summary> /// <param name="httpClient">An optional HTTP client which may me injected in order to facilitate testing.</param> /// <param name="options">A <see cref="InfosetClientOptions"/> instance that defines the configuration settings to use with the client </param> /// <returns>Interface to the Infoset API</returns> internal InfosetClient(HttpClient httpClient, InfosetClientOptions options) { this.options = options ?? throw new ArgumentNullException(nameof(options)); this.client = httpClient ?? CreateHttpClientWithRetryHandler(); if (this.options.RequestHeaders != null && this.options.RequestHeaders.TryGetValue(ContentType, out var contentType)) { this.MediaType = contentType; } }
/// <summary> /// Initializes a new instance of the <see cref="InfosetClient"/> class. /// </summary> /// <param name="options">A <see cref="InfosetClientOptions"/> instance that defines the configuration settings to use with the client </param> /// <returns>Interface to the Infoset API</returns> public InfosetClient(InfosetClientOptions options) : this(null, options) { }