diff --git a/Distribution.Stream/Distribution.Stream.csproj b/Distribution.Stream/Distribution.Stream.csproj index 0ff48a2..1183ba0 100644 --- a/Distribution.Stream/Distribution.Stream.csproj +++ b/Distribution.Stream/Distribution.Stream.csproj @@ -9,7 +9,7 @@ true True - 1.2.0 + 1.2.2 HTTP service with streaming and parallel execution. artemiusgreat indemos.com diff --git a/Distribution.Stream/Service.cs b/Distribution.Stream/Service.cs index 70e0a85..3e70177 100644 --- a/Distribution.Stream/Service.cs +++ b/Distribution.Stream/Service.cs @@ -46,6 +46,7 @@ public Service(HttpClient client) { WriteIndented = true, PropertyNameCaseInsensitive = true, + ReferenceHandler = ReferenceHandler.IgnoreCycles, ReadCommentHandling = JsonCommentHandling.Skip, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull, NumberHandling = @@ -99,10 +100,7 @@ public Service(HttpClient client) /// /// /// - public virtual async Task Stream( - HttpRequestMessage message, - JsonSerializerOptions options = null, - CancellationTokenSource cts = null) + public virtual async Task Stream(HttpRequestMessage message, CancellationTokenSource cts = null) { cts ??= new CancellationTokenSource(Timeout); @@ -143,7 +141,7 @@ public virtual async Task> Send( return response; } - response.Data = await JsonSerializer.DeserializeAsync(content, Options).ConfigureAwait(false); + response.Data = await JsonSerializer.DeserializeAsync(content, options).ConfigureAwait(false); } } catch (Exception e)