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

Improve API for sending binary #52

Open
johnhferland opened this issue May 6, 2019 · 0 comments
Open

Improve API for sending binary #52

johnhferland opened this issue May 6, 2019 · 0 comments

Comments

@johnhferland
Copy link
Contributor

To send a slice of bytes across the wire we need to convert the bytes to a func () io.ReadCloser, which is pretty cumbersome. I would like to propose we expose an API where we can simply provide []byte and conjure-go will do the rest.
Before:

c.PutEndpoint(ctx, func() io.ReadCloser { return ioutil.NopCloser(bytes.NewReader(bodyBytes)) })

After:

c.PutEndpoint(ctx, bodyBytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant