Skip to content

Responds with Blob and custom content-type from API Lambdas #7288

Answered by RuBAN-GT
capybaraborn asked this question in Q&A
Discussion options

You must be logged in to vote

Found solution:

const context = useHonoContext()
context.res = new Response(new Uint8Array(graphic).buffer, {
  status: 200,
  headers: {
    'Content-Type': 'image/png',
  },
})

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

@RuBAN-GT
Comment options

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