We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I init a request without a header, it will cause a error if I use AddCookie
req := http.Request{} req.AddCookie(&http.Cookie{ Name: "access_token", Value: "123", }) // assignment to entry in nil map
Should method AddCookie check the header and init it, or the coder init the header before use AddCookie? (relevant code:
go/src/net/http/request.go
Line 433 in 78c20c8
The text was updated successfully, but these errors were encountered:
Why not use http.NewRequest?
http.NewRequest
Sorry, something went wrong.
Thanks for reminding, it should work.
See also https://github.com/golang/go/wiki/Questions. Looks like this is resolved, closing.
No branches or pull requests
When I init a request without a header, it will cause a error if I use AddCookie
Should method AddCookie check the header and init it, or the coder init the header before use AddCookie?
(relevant code:
go/src/net/http/request.go
Line 433 in 78c20c8
PTAL.
The text was updated successfully, but these errors were encountered: