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: Request.FormValue document return value if missing key #8137

Closed
gopherbot opened this issue Jun 2, 2014 · 3 comments
Closed

net/http: Request.FormValue document return value if missing key #8137

gopherbot opened this issue Jun 2, 2014 · 3 comments
Milestone

Comments

@gopherbot
Copy link

by nicolas.riesco:

What does 'go version' print?

go version go1.3rc1 linux/amd64

What steps reproduce the problem?
If possible, include a link to a program on play.golang.org.

1. godoc net/http FormValue
2.
3.

What happened?

[...]
func (r *Request) FormValue(key string) string
    FormValue returns the first value for the named component of the query.
    POST and PUT body parameters take precedence over URL query string
    values. FormValue calls ParseMultipartForm and ParseForm if necessary.
    To access multiple values of the same key use ParseForm.

What should have happened instead?

Please, document that an empty string is returned if they the requested key is missing.

Please provide any additional information below.

Is the documentation of this method up to date? The source code only calls
ParseMultipartForm.
@griesemer
Copy link
Contributor

Comment 1:

Labels changed: added repo-main.

@bradfitz bradfitz removed the new label Dec 18, 2014
@rsc rsc added this to the Go1.5Maybe milestone Apr 10, 2015
@rsc rsc removed the repo-main label Apr 14, 2015
@bradfitz
Copy link
Contributor

@gopherbot
Copy link
Author

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

@mikioh mikioh modified the milestones: Go1.5, Go1.5Maybe Jun 25, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
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

5 participants