Skip to content

Commit

Permalink
Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gcbeattyAWS committed Dec 9, 2024
1 parent 080a13d commit 57bfdc2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public IApiGatewayRequestTranslator Create(ApiGatewayMode apiGatewayMode)
{
ApiGatewayMode.REST => _serviceProvider.GetRequiredService<ApiGatewayProxyRequestTranslator>(),
ApiGatewayMode.HTTPV1 => _serviceProvider.GetRequiredService<ApiGatewayProxyRequestTranslator>(),
ApiGatewayMode.HTTPV2 => _serviceProvider.GetRequiredService<ApiGatewayHttpApiV2ProxyRequestTranslator>()
ApiGatewayMode.HTTPV2 => _serviceProvider.GetRequiredService<ApiGatewayHttpApiV2ProxyRequestTranslator>(),
_ => throw new NotImplementedException()
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public string ReadRequestBody(HttpRequest request)

foreach (var header in headers)
{
singleValueHeaders[header.Key] = header.Value.Last();
multiValueHeaders[header.Key] = header.Value.ToList();
singleValueHeaders[header.Key] = header.Value.Last() ?? "";
multiValueHeaders[header.Key] = [.. header.Value];
}

return (singleValueHeaders, multiValueHeaders);
Expand All @@ -82,7 +82,7 @@ public string ReadRequestBody(HttpRequest request)

foreach (var param in query)
{
singleValueParams[param.Key] = param.Value.Last();
singleValueParams[param.Key] = param.Value.Last() ?? "";
multiValueParams[param.Key] = [.. param.Value];
}

Expand Down

0 comments on commit 57bfdc2

Please sign in to comment.