Skip to content

Commit e924df9

Browse files
hwoodiwissmartincostello
authored andcommitted
Add Interceptor Overload for Send
1 parent bf7c9a9 commit e924df9

File tree

11 files changed

+388
-2
lines changed

11 files changed

+388
-2
lines changed

src/HttpClientInterception/InterceptingHttpMessageHandler.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public InterceptingHttpMessageHandler(HttpClientInterceptorOptions options, Http
4141
_options = options ?? throw new ArgumentNullException(nameof(options));
4242
}
4343

44+
#if NET6_0_OR_GREATER
45+
/// <inheritdoc />
46+
protected override HttpResponseMessage Send(HttpRequestMessage request, CancellationToken cancellationToken) =>
47+
SendAsync(request, cancellationToken).ConfigureAwait(false).GetAwaiter().GetResult();
48+
#endif
49+
4450
/// <inheritdoc />
4551
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
4652
{

src/HttpClientInterception/JustEat.HttpClientInterception.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<PackageReference Include="System.Net.Http" />
2424
</ItemGroup>
2525
<ItemGroup>
26-
<AdditionalFiles Include="PublicAPI.Shipped.txt" />
27-
<AdditionalFiles Include="PublicAPI.Unshipped.txt" />
26+
<AdditionalFiles Include="PublicAPI/$(TargetFramework)/PublicAPI.Shipped.txt" />
27+
<AdditionalFiles Include="PublicAPI/$(TargetFramework)/PublicAPI.Unshipped.txt" />
2828
</ItemGroup>
2929
</Project>

src/HttpClientInterception/PublicAPI.Shipped.txt renamed to src/HttpClientInterception/PublicAPI/net472/PublicAPI.Shipped.txt

File renamed without changes.

src/HttpClientInterception/PublicAPI.Unshipped.txt renamed to src/HttpClientInterception/PublicAPI/net472/PublicAPI.Unshipped.txt

File renamed without changes.

src/HttpClientInterception/PublicAPI/net6.0/PublicAPI.Shipped.txt

Lines changed: 116 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#nullable enable
2+
override JustEat.HttpClientInterception.InterceptingHttpMessageHandler.Send(System.Net.Http.HttpRequestMessage! request, System.Threading.CancellationToken cancellationToken) -> System.Net.Http.HttpResponseMessage!

src/HttpClientInterception/PublicAPI/net7.0/PublicAPI.Shipped.txt

Lines changed: 116 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#nullable enable
2+
override JustEat.HttpClientInterception.InterceptingHttpMessageHandler.Send(System.Net.Http.HttpRequestMessage! request, System.Threading.CancellationToken cancellationToken) -> System.Net.Http.HttpResponseMessage!

src/HttpClientInterception/PublicAPI/netstandard2.0/PublicAPI.Shipped.txt

Lines changed: 116 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#nullable enable

0 commit comments

Comments
 (0)