Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
net/http: reconsider request.Body #12977
Go Version: 1.5
I'd like to see that the concept of request.Body is reconsidered. While on the server side(you have http.ResponseWriter and you only need to read the reqest.Body) it may be good to use It's annoying for the client side.
A request send from a client always requirs a reader to read from, but this is critical and expensive in multiple ways. Especially if you may upload larger data(ex: a large encoded json, a generated image) you kinda need to find a good encode logic(either you use 2 goroutines or some state machine which can encode up to N bytes per Write call) or you allocate a large buffer encode to it and send the data.
However I'll head over to the mailing list then I think.