Skip to content

Commit e7c6cc9

Browse files
committed
Merge branch 'hotfix/improve-response-capture-semantics'
2 parents 4c76a56 + 9469d36 commit e7c6cc9

File tree

1 file changed

+0
-48
lines changed

1 file changed

+0
-48
lines changed

libs/TrybeSDK/ApiClient.cs

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,6 @@ protected internal async Task<TrybeResponse> SendAsync(
6565
(HttpStatusCode)0,
6666
error: new Error(ex.Message, exception: ex));
6767

68-
if (httpReq?.Content is not null)
69-
{
70-
response.RequestContent = await httpReq.Content.ReadAsStringAsync()
71-
.ConfigureAwait(false);
72-
}
73-
74-
if (httpResp?.Content is not null)
75-
{
76-
response.ResponseContent = await httpResp.Content.ReadAsStringAsync()
77-
.ConfigureAwait(false); ;
78-
}
79-
8068
return response;
8169
}
8270
}
@@ -122,18 +110,6 @@ protected internal async Task<TrybeResponse> SendAsync<TRequest>(
122110
(HttpStatusCode)0,
123111
error: new Error(ex.Message, exception: ex));
124112

125-
if (httpReq?.Content is not null)
126-
{
127-
response.RequestContent = await httpReq.Content.ReadAsStringAsync()
128-
.ConfigureAwait(false);
129-
}
130-
131-
if (httpResp?.Content is not null)
132-
{
133-
response.ResponseContent = await httpResp.Content.ReadAsStringAsync()
134-
.ConfigureAwait(false); ;
135-
}
136-
137113
return response;
138114
}
139115
}
@@ -174,18 +150,6 @@ protected internal async Task<TrybeResponse<TResponse>> FetchAsync<TResponse>(
174150
(HttpStatusCode)0,
175151
error: new Error(ex.Message, exception: ex));
176152

177-
if (httpReq?.Content is not null)
178-
{
179-
response.RequestContent = await httpReq.Content.ReadAsStringAsync()
180-
.ConfigureAwait(false);
181-
}
182-
183-
if (httpResp?.Content is not null)
184-
{
185-
response.ResponseContent = await httpResp.Content.ReadAsStringAsync()
186-
.ConfigureAwait(false); ;
187-
}
188-
189153
return response;
190154
}
191155
finally
@@ -244,18 +208,6 @@ protected internal async Task<TrybeResponse<TResponse>> FetchAsync<TRequest, TRe
244208
(HttpStatusCode)0,
245209
error: new Error(ex.Message, exception: ex));
246210

247-
if (httpReq?.Content is not null)
248-
{
249-
response.RequestContent = await httpReq.Content.ReadAsStringAsync()
250-
.ConfigureAwait(false);
251-
}
252-
253-
if (httpResp?.Content is not null)
254-
{
255-
response.ResponseContent = await httpResp.Content.ReadAsStringAsync()
256-
.ConfigureAwait(false); ;
257-
}
258-
259211
return response;
260212
}
261213
finally

0 commit comments

Comments
 (0)