Skip to content

How can I hook into RegisterResponseContentEncodingForContentType #1255

Discussion options

You must be logged in to vote

I've found a work around, but seems a bit hacky. Ideally there is a more elegant way...

I basically had to copy small parts of the source and modify them, creating my own custom APIGatewayHttpApiV2LambdaRuntimeSupportServer and then a custom extension method to register it similar to AddAWSLambdaHosting

All that to add the one line for RegisterResponseContentEncodingForContentType

Custom LambdaRuntimeSupportServer

public class CustomAPIGatewayHttpApiV2LambdaRuntimeSupportServer : LambdaRuntimeSupportServer
{
    public CustomAPIGatewayHttpApiV2LambdaRuntimeSupportServer(IServiceProvider serviceProvider)
        : base(serviceProvider)
    {
    }

    protected override HandlerWrapper Cre…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@brendonparker
Comment options

Answer selected by brendonparker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant