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

net/http/httptest: add helper to create a server requests #14199

Closed
bradfitz opened this issue Feb 2, 2016 · 1 comment
Closed

net/http/httptest: add helper to create a server requests #14199

bradfitz opened this issue Feb 2, 2016 · 1 comment
Milestone

Comments

@bradfitz
Copy link
Contributor

bradfitz commented Feb 2, 2016

It's a pain to create an *http.Request for use with httptest.Server handlers. http.NewRequest is almost right but is for for outbound requests, not inbound requests. The correct way is http.ReadRequest which requires a bufio.Reader. Let's add a helper func to httptest.

@gopherbot
Copy link

CL https://golang.org/cl/21016 mentions this issue.

@golang golang locked and limited conversation to collaborators Mar 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants