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

Make aws_smithy_http::byte_stream::ByteStream not expose SdkBody #1125

Open
david-perez opened this issue Jan 27, 2022 · 2 comments
Open

Make aws_smithy_http::byte_stream::ByteStream not expose SdkBody #1125

david-perez opened this issue Jan 27, 2022 · 2 comments
Assignees
Labels
blocked server Rust server SDK

Comments

@david-perez
Copy link
Contributor

As mentioned here #1023 (comment)

We have decided that we will use aws_smithy_http::byte_stream::ByteStream,
making all methods referencing SdkBody #[doc(hidden)] (new, into_inner,
From<SdkBody> impl), and we will add generic methods that don’t reference
SdkBody.

This change is to allow server users to return ByteStreams in their output shapes, for streaming responses. The server so far has not used SdkBody, with all its code working against http_body::Body.

@david-perez david-perez added the server Rust server SDK label Jan 27, 2022
@82marbag 82marbag self-assigned this May 3, 2022
@david-perez
Copy link
Contributor Author

There's some prior work here, making ByteStream and FsBuilder generic over the body type, but FsBuilder::build has in its implementation:

Ok(ByteStream::new(SdkBody::retryable(body_loader)))

And it wasn't rewritten successfully with the same semantics with an arbitrary body B.

@david-perez
Copy link
Contributor Author

We also want ByteStream to be constructible from an arbitrary Stream, which might be an easier thing to do first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked server Rust server SDK
Projects
None yet
Development

No branches or pull requests

2 participants