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

map[string]string encode/decode #47

Open
RelicOfTesla opened this issue Mar 18, 2020 · 1 comment
Open

map[string]string encode/decode #47

RelicOfTesla opened this issue Mar 18, 2020 · 1 comment

Comments

@RelicOfTesla
Copy link

fv, _ := form.NewEncoder().Encode(map[string]string{"a": "b"})
fmt.Printf(`the str="%s"`+"\n", fv.Encode())
the str="%5Ba%5D=b"

i will httpPost(xxx, encodeIt(x))

@RelicOfTesla
Copy link
Author

strmap := map[string]string{}
form.NewDecoder().Decode(&strmap, url.Values{"a": []string{"b"}})   // FormValue <= http://xx.com/?a=b
fmt.Println(strmap)

@RelicOfTesla RelicOfTesla changed the title map[string]string encode map[string]string encode/decode Mar 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant