Skip to content

Commit

Permalink
chore(deps): update dependency serilog.sinks.http to v9 (#106)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency serilog.sinks.http to v9

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: FantasticFiasco <[email protected]>
  • Loading branch information
renovate[bot] and FantasticFiasco authored Apr 22, 2024
1 parent 0db1fb5 commit 85006d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions sample/Sink/CustomHttpClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.IO;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Serilog.Sinks.Http;
Expand All @@ -14,13 +15,13 @@ public class CustomHttpClient : IHttpClient

public void Configure(IConfiguration configuration) => httpClient.DefaultRequestHeaders.Add("X-Api-Key", configuration["apiKey"]);

public async Task<HttpResponseMessage> PostAsync(string requestUri, Stream contentStream)
public async Task<HttpResponseMessage> PostAsync(string requestUri, Stream contentStream, CancellationToken cancellationToken)
{
using var content = new StreamContent(contentStream);
content.Headers.Add("Content-Type", "application/json");

var response = await httpClient
.PostAsync(requestUri, content)
.PostAsync(requestUri, content, cancellationToken)
.ConfigureAwait(false);

return response;
Expand Down
2 changes: 1 addition & 1 deletion sample/sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageReference Include="Bogus" Version="35.5.0" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
<PackageReference Include="Serilog.Sinks.Http" Version="8.0.0" />
<PackageReference Include="Serilog.Sinks.Http" Version="9.0.0" />
</ItemGroup>

</Project>

0 comments on commit 85006d1

Please sign in to comment.