From 7327f0d9013c6e57f3d16e5403c88e97e86e3831 Mon Sep 17 00:00:00 2001 From: scbedd <45376673+scbedd@users.noreply.github.com> Date: Wed, 1 Feb 2023 11:06:53 -0800 Subject: [PATCH] fit/finish --- .../Azure.Sdk.Tools.TestProxy/RecordingHandler.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs index adc259ccdcc..7544c55114c 100644 --- a/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs +++ b/tools/test-proxy/Azure.Sdk.Tools.TestProxy/RecordingHandler.cs @@ -194,10 +194,9 @@ public async Task HandleRecordRequestAsync(string recordingId, HttpRequest incom throw new HttpException(HttpStatusCode.BadRequest, $"There is no active recording session under id {recordingId}."); } - (RecordEntry entry, byte[] bytes) = await CreateEntryAsync(incomingRequest).ConfigureAwait(false); - var entry = entryTuple.Item1; + (RecordEntry entry, byte[] requestBody) = await CreateEntryAsync(incomingRequest).ConfigureAwait(false); - var upstreamRequest = CreateUpstreamRequest(incomingRequest, entryTuple.Item2); + var upstreamRequest = CreateUpstreamRequest(incomingRequest, requestBody); HttpResponseMessage upstreamResponse = null; @@ -471,7 +470,7 @@ public async Task HandlePlaybackRequest(string recordingId, HttpRequest incoming } } - public static async Task> CreateEntryAsync(HttpRequest request) + public static async Task<(RecordEntry, byte[])> CreateEntryAsync(HttpRequest request) { var entry = new RecordEntry(); entry.RequestUri = GetRequestUri(request).AbsoluteUri; @@ -488,7 +487,7 @@ public static async Task> CreateEntryAsync(HttpReques byte[] bytes = await ReadAllBytes(request.Body).ConfigureAwait(false); entry.Request.Body = CompressionUtilities.DecompressBody(bytes, request.Headers); - return new Tuple(entry, bytes); + return (entry, bytes); } #endregion