Skip to content

Commit

Permalink
Updated TypedRest
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianeicher committed Oct 5, 2023
1 parent 1d22d60 commit f30f37e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Client/Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<ProjectReference Include="..\Model\Model.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="TypedRest.Reactive" Version="1.3.8" />
<PackageReference Include="TypedRest.Reactive" Version="1.5.1" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Client/OpenServiceBrokerErrorHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace OpenServiceBroker;
/// </summary>
public class OpenServiceBrokerErrorHandler : IErrorHandler
{
private static readonly MediaTypeFormatter Serializer = new DefaultJsonSerializer();
private static readonly MediaTypeFormatter Serializer = new NewtonsoftJsonSerializer();

public async Task HandleAsync(HttpResponseMessage response)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Client/ServiceBrokerEndpointBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ protected async Task<TDeferred> ParseDeferredResponseAsync<TComplete, TDeferred>
}

protected Task<T> FromContentAsync<T>(HttpResponseMessage message)
=> message.Content.ReadAsAsync<T>(new[] {Serializer});
=> message.Content.ReadAsAsync<T>(Serializers);
}
2 changes: 1 addition & 1 deletion src/UnitTests/Instances/ServiceInstanceBlockingFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public async Task UpdateBody()
Mock.Setup(x => x.UpdateAsync(new("123"), request))
.Returns(Task.CompletedTask);

var result = await Client.HttpClient.PatchAsync(Client.ServiceInstancesBlocking["123"].Uri, request, Client.Serializer);
var result = await Client.HttpClient.PatchAsync(Client.ServiceInstancesBlocking["123"].Uri, request, Client.Serializers[0]);
result.StatusCode.Should().Be(HttpStatusCode.OK);
string resultString = await result.Content.ReadAsStringAsync();
resultString.Should().Be("{}");
Expand Down

0 comments on commit f30f37e

Please sign in to comment.