-
Notifications
You must be signed in to change notification settings - Fork 114
[core] Implement Lambda streaming with custom HTTP headers #521
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
base: main
Are you sure you want to change the base?
Conversation
970ecef
to
b6fb60c
Compare
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.
Pull Request Overview
This PR implements Lambda streaming functionality with custom HTTP headers, allowing developers to set HTTP status codes and headers before streaming response bodies. This addresses the need for more control over HTTP response metadata in streaming Lambda functions.
- Adds
StreamingLambdaStatusAndHeadersResponse
struct for configuring HTTP status and headers - Implements
writeStatusAndHeaders
extension method onLambdaResponseStreamWriter
- Updates documentation and examples to demonstrate the new streaming capabilities
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
readme.md | Adds documentation and examples for streaming with HTTP headers |
Sources/AWSLambdaRuntime/LambdaResponseStreamWriter+Headers.swift | Core implementation of headers functionality with response struct and extension methods |
Tests/AWSLambdaRuntimeTests/LambdaResponseStreamWriter+HeadersTests.swift | Comprehensive test suite covering functionality, error handling, and integration scenarios |
Examples/Streaming/Sources/main.swift | Updated streaming examples demonstrating headers usage and conditional responses |
Examples/Streaming/README.md | Enhanced documentation explaining header usage and streaming patterns |
Fix #520