Skip to content

How to response binary content with AWS Lambda Container and ASP.NET Minimal API? #1527

Answered by ashishdhingra
mikucat0309 asked this question in Q&A
Discussion options

You must be logged in to vote

@mikucat0309 I'm unsure what you might be doing wrong, but I changed logic to add builder.Services.AddAWSLambdaHosting(LambdaEventSource.HttpApi); in my project and integrated it with HTTP API, it returns the following response:

{
    "statusCode":200,
    "headers":{
        "Content-Type":"image/jpg"
    },
    "cookies":null,
    "body":"/9j/2wCEAAICAgICAgICA.........p0qzHhv2P/9k=",
    "isBase64Encoded":true
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@mikucat0309
Comment options

@ashishdhingra
Comment options

Answer selected by ashishdhingra
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
response-requested Waiting on additional info and feedback. Will move to close soon in 7 days. module/lambda-client-lib
2 participants