Skip to content

Commit b7b51bd

Browse files
committed
Change response stream factory to return LambdaResponseStream instead of Stream so that we can potentially expose more methods in the future.
1 parent 42d3212 commit b7b51bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Libraries/src/Amazon.Lambda.Core/ResponseStreaming/LambdaResponseStreamFactory.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ internal static void SetLambdaResponseStream(Func<byte[], ILambdaResponseStream>
3131
}
3232

3333
/// <summary>
34-
/// Creates a <see cref="Stream"/> that can be used to write streaming responses back to callers of the Lambda function. Once
34+
/// Creates a <see cref="LambdaResponseStream"/> a subclass of <see cref="Stream"/> that can be used to write streaming responses back to callers of the Lambda function. Once
3535
/// a Lambda function creates a response stream all output must be returned by writing to the stream; the Lambda function's handler
3636
/// return value will be ignored. The stream is write-only and non-seekable.
3737
/// </summary>
3838
/// <returns></returns>
39-
public static Stream CreateStream()
39+
public static LambdaResponseStream CreateStream()
4040
{
4141
if (_streamFactory == null)
4242
throw new InvalidOperationException(UninitializedFactoryMessage);
@@ -46,7 +46,7 @@ public static Stream CreateStream()
4646
}
4747

4848
/// <summary>
49-
/// Create a <see cref="Stream"/> for writing streaming responses, with an HTTP response prelude containing status code and headers. This should be used for
49+
/// Creates a <see cref="LambdaResponseStream"/> a subclass of <see cref="Stream"/> for writing streaming responses, with an HTTP response prelude containing status code and headers. This should be used for
5050
/// Lambda functions using response streaming that are invoked via the Lambda Function URLs or API Gateway HTTP APIs, where the response format is expected to be an HTTP response.
5151
/// The prelude will be serialized and sent as the first chunk of the response stream, and should contain any necessary HTTP status code and headers.
5252
/// <para>
@@ -56,7 +56,7 @@ public static Stream CreateStream()
5656
/// </summary>
5757
/// <param name="prelude">The HTTP response prelude including status code and headers.</param>
5858
/// <returns></returns>
59-
public static Stream CreateHttpStream(HttpResponseStreamPrelude prelude)
59+
public static LambdaResponseStream CreateHttpStream(HttpResponseStreamPrelude prelude)
6060
{
6161
if (_streamFactory == null)
6262
throw new InvalidOperationException(UninitializedFactoryMessage);

0 commit comments

Comments
 (0)