From e04599bad9c930d8101ace78ee9c1d234f93e52e Mon Sep 17 00:00:00 2001 From: Stevan Freeborn <65925598+StevanFreeborn@users.noreply.github.com> Date: Sun, 18 Aug 2024 12:53:08 -0500 Subject: [PATCH] chore: put request json in intermediate variable to make debugging better --- src/AnthropicClient/AnthropicApiClient.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/AnthropicClient/AnthropicApiClient.cs b/src/AnthropicClient/AnthropicApiClient.cs index 2c57cdd..7ec3b10 100644 --- a/src/AnthropicClient/AnthropicApiClient.cs +++ b/src/AnthropicClient/AnthropicApiClient.cs @@ -275,8 +275,9 @@ public class AnthropicApiClient : IAnthropicApiClient } private async Task SendRequestAsync(BaseMessageRequest request) - { - var requestContent = new StringContent(Serialize(request), Encoding.UTF8, JsonContentType); + { + var requestJson = Serialize(request); + var requestContent = new StringContent(requestJson, Encoding.UTF8, JsonContentType); return await _httpClient.PostAsync(MessagesEndpoint, requestContent); }