Skip to content

AsyncRequestProvider for Strings #159

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

Closed
SimplyAmuthan opened this issue Sep 14, 2017 · 3 comments
Closed

AsyncRequestProvider for Strings #159

SimplyAmuthan opened this issue Sep 14, 2017 · 3 comments
Labels
2.0 New feature-request A feature should be added or improved.

Comments

@SimplyAmuthan
Copy link

Hi ... is there a AsyncRequestProvider that stream from String, basically I would like to use the S3AsyncClient to put string object into s3
I only have option to write string into a file system and and upload from there using something like this s3AsyncClient.putObject(putObjectRequest, AsyncRequestProvider.fromFile(Paths.get("myfile.json")))
but I would like to have something like s3AsyncClient.putObject(putObjectRequest, AsyncRequestProvider.fromObject(myOBject.toString))

@millems
Copy link
Contributor

millems commented Sep 14, 2017

+1: Support for byte[] would be nice! Having explicit String support would probably just be an alias for toBytes(Charset), since we probably want people to specify the encoding explicitly.

@millems millems changed the title ObjectAsyncRequestProvider AsyncRequestProvider for Strings Sep 14, 2017
@shorea
Copy link
Contributor

shorea commented Sep 14, 2017

Got a potential solution in PR

https://github.com/aws/aws-sdk-java-v2/pull/161/files

@shorea
Copy link
Contributor

shorea commented Sep 15, 2017

Merged into master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 New feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

4 participants