-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register encoding options when adding the service to the service collection #1575
base: master
Are you sure you want to change the base?
Conversation
Good idea, Very usefull for webp images with api gateway. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. I think the approach to solve the problem of configuring binary data is good. A few minor comments plus we also need some tests in the Amazon.Lambda.AspNetCoreServer.Test
project.
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/EncodingOptions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/EncodingOptions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/HostingOptions.cs
Outdated
Show resolved
Hide resolved
@normj Thanks for your feedbacks I just dit a new commit with following changes :
For unit tests, what would be the best way to test the injection of IEncodingOptions ? |
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Internal/LambdaRuntimeSupportServer.cs
Outdated
Show resolved
Hide resolved
I just moved the registration of IEncodingOptions to LambdaRuntimeSupportServer level and removed redundant code from each AbstractAspNetCoreFunction<TREQUEST, TRESPONSE> implementations (APIGatewayHttpApiV2MinimalApi, APIGatewayRestApiMinimalApi and ApplicationLoadBalancerMinimalApi) |
Issue:: #1574
Description of changes:
Can now register content type for transformation by passing options to the HostingOptions object