Why multipart.DataFields use map[string]string to contain the request form?
elonzh opened this issue · 5 comments
Normally, a form key only has single value, but it's also right with multiple values .
Why not use url.Values
?
If we use Body
or BodyString
method to make 1:n key-value pair, we need define the proper Content-Type header representing the real content MIME type.
Clearly, this is an interface limitation. It should be map[string][]string
, such as url.Values
:
https://golang.org/pkg/net/url/#Values
If you want a fast fix, would you mind providing a PR? I will merge it asap!
I'm still reviewing and testing the code. I will try to contribute code later.
I had a few time tonight to fix this. See: b8321b8
The fix will be shipped in gentleman@v1.0.3
soon.
Fix was shipped in gentleman@v1.0.3
. You can upgrade it running:
go get -u gopkg.in/h2non/gentleman.v1