Skip to content

Commit

Permalink
Merge branch 'hotfix/improve-response-capture-semantics'
Browse files Browse the repository at this point in the history
  • Loading branch information
Antaris committed Dec 23, 2024
2 parents 4c76a56 + 9469d36 commit e7c6cc9
Showing 1 changed file with 0 additions and 48 deletions.
48 changes: 0 additions & 48 deletions libs/TrybeSDK/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@ protected internal async Task<TrybeResponse> SendAsync(
(HttpStatusCode)0,
error: new Error(ex.Message, exception: ex));

if (httpReq?.Content is not null)
{
response.RequestContent = await httpReq.Content.ReadAsStringAsync()
.ConfigureAwait(false);
}

if (httpResp?.Content is not null)
{
response.ResponseContent = await httpResp.Content.ReadAsStringAsync()
.ConfigureAwait(false); ;
}

return response;
}
}
Expand Down Expand Up @@ -122,18 +110,6 @@ protected internal async Task<TrybeResponse> SendAsync<TRequest>(
(HttpStatusCode)0,
error: new Error(ex.Message, exception: ex));

if (httpReq?.Content is not null)
{
response.RequestContent = await httpReq.Content.ReadAsStringAsync()
.ConfigureAwait(false);
}

if (httpResp?.Content is not null)
{
response.ResponseContent = await httpResp.Content.ReadAsStringAsync()
.ConfigureAwait(false); ;
}

return response;
}
}
Expand Down Expand Up @@ -174,18 +150,6 @@ protected internal async Task<TrybeResponse<TResponse>> FetchAsync<TResponse>(
(HttpStatusCode)0,
error: new Error(ex.Message, exception: ex));

if (httpReq?.Content is not null)
{
response.RequestContent = await httpReq.Content.ReadAsStringAsync()
.ConfigureAwait(false);
}

if (httpResp?.Content is not null)
{
response.ResponseContent = await httpResp.Content.ReadAsStringAsync()
.ConfigureAwait(false); ;
}

return response;
}
finally
Expand Down Expand Up @@ -244,18 +208,6 @@ protected internal async Task<TrybeResponse<TResponse>> FetchAsync<TRequest, TRe
(HttpStatusCode)0,
error: new Error(ex.Message, exception: ex));

if (httpReq?.Content is not null)
{
response.RequestContent = await httpReq.Content.ReadAsStringAsync()
.ConfigureAwait(false);
}

if (httpResp?.Content is not null)
{
response.ResponseContent = await httpResp.Content.ReadAsStringAsync()
.ConfigureAwait(false); ;
}

return response;
}
finally
Expand Down

0 comments on commit e7c6cc9

Please sign in to comment.