parnurzeal / gorequest

GoRequest -- Simplified HTTP client ( inspired by nodejs SuperAgent )
http://parnurzeal.github.io/gorequest/
MIT License
3.44k stars 414 forks source link

Keys of query params are incorrectly converted to lower case when in form of map. #253

Closed wuhan005 closed 2 years ago

wuhan005 commented 4 years ago

When send map as query params, all the keys will be lower case.

For example:

gorequest.New().Get("http://localhost/").Query(map[string]string{"Foo": "bar", "QWE": "RTY"}).End()

It will request the url http://localhost/?foo=bar&qwe=RTY, the expected is http://localhost/?Foo=bar&QWE=RTY.

For the queryMap() call the queryStruct() and the keys have been converted to lower case at https://github.com/parnurzeal/gorequest/blob/develop/gorequest.go#L539

llqgit commented 3 years ago

It's so stupid auto change charactor case. It's a bug. Fix it please........

wklken commented 2 years ago

https://github.com/wklken/gorequest/pull/7