diff --git a/Src/HoneyBear.HalClient/HalClient.cs b/Src/HoneyBear.HalClient/HalClient.cs index e2a6f1e..628c57e 100644 --- a/Src/HoneyBear.HalClient/HalClient.cs +++ b/Src/HoneyBear.HalClient/HalClient.cs @@ -19,7 +19,7 @@ public class HalClient : IHalClient private readonly IEnumerable _formatters; private IEnumerable _current = Enumerable.Empty(); - private static readonly IEnumerable _defaultFormatters = + private static readonly ICollection _defaultFormatters = new[] {new HalJsonMediaTypeFormatter()}; /// @@ -32,10 +32,10 @@ public class HalClient : IHalClient /// public HalClient( HttpClient client, - IEnumerable formatters) + ICollection formatters) { _client = new JsonHttpClient(client); - _formatters = formatters; + _formatters = formatters == null || !formatters.Any() ? _defaultFormatters : formatters; } ///