Skip to content

Commit 5fab03e

Browse files
committed
fix: dotnet
1 parent ae4fab4 commit 5fab03e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

templates/dotnet/src/Appwrite/Client.cs.twig

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,10 @@ namespace {{ spec.title | caseUcfirst }}
269269
var response = await _http.SendAsync(request);
270270
var code = (int)response.StatusCode;
271271

272-
var warnings = response.Headers.GetValues("x-{{ spec.title | lower }}-warning");
273-
if (warnings != null)
272+
IEnumerable<string> warnings = response.Headers.TryGetValues("x-{{ spec.title | lower }}-warning");
273+
foreach (var warning in warnings)
274274
{
275-
foreach (var warning in warnings.Split(';'))
276-
{
277-
Console.WriteLine("Warning: " + warning);
278-
}
275+
Console.WriteLine("Warning: " + warning);
279276
}
280277

281278
string contentType = string.Empty;

0 commit comments

Comments
 (0)