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

Remove PostData, etc. have option of io.Reader/io.Writer #8

Open
GoogleCodeExporter opened this issue Apr 20, 2015 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link

 1 Why need to specify the post data, params argument and output type?

    All of post data, params argument and output type can be found from function signature, using order in signature. That will allow to use type defined in other package more easily, like: http://play.golang.org/p/FUj-FXKr71

 2 Why Marshaller takes []byte instead of io.Reader/io.Writer?

    I think use io.Reader/io.Writer will much convenience for streaming io. Direct reading from request.Body or writing to responseWriter will also save a lot of memory if post or response is very large.



Original issue reported on code.google.com by [email protected] on 7 Mar 2013 at 9:24

@GoogleCodeExporter
Copy link
Author

I've attached a patch for the Marshallers to use an io.Reader. I've internally 
used this for letting a large file stream down, rather then having to be fully 
read into memory.
Let me know what you think...

Original comment by [email protected] on 7 Jan 2014 at 8:32

Attachments:

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

No branches or pull requests

1 participant