Skip to content
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

Support streamifyResponse #1039

Merged
merged 6 commits into from Apr 10, 2023
Merged

Support streamifyResponse #1039

merged 6 commits into from Apr 10, 2023

Conversation

willfarrell
Copy link
Member

@willfarrell willfarrell commented Apr 8, 2023

Closes #1038

  • middy supports streamifyResponse with ReadableStream body
  • middy supports streamifyResponse without ReadableStream body (needed?)
  • Add new docs page
  • http-content-encoding support ReadableStream body
  • Update http-content-encoding docs
  • real lambda testing

Test

Using Function URL, arm, nodejs18.x, esm

import middy from '@middy/core'
export const handler = middy({ streamifyResponse: true })
  .handler(() => {
    return {
      statusCode: ***,
      headers: {
        'Content-Type': 'text/plain',
        'X-Custom-Header': 'Example-Custom-Header'
      },
      body: ***
    }
  })

@willfarrell willfarrell marked this pull request as ready for review April 8, 2023 05:24
@willfarrell willfarrell merged commit 4c5715b into main Apr 10, 2023
6 of 7 checks passed
@willfarrell willfarrell deleted the feature/streamifyResponse branch April 10, 2023 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Support Stream Repsonse
1 participant