Closed wuhan005 closed 2 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.
http://localhost/?foo=bar&qwe=RTY
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
queryMap()
queryStruct()
It's so stupid auto change charactor case. It's a bug. Fix it please........
https://github.com/wklken/gorequest/pull/7
When send map as query params, all the keys will be lower case.
For example:
It will request the url
http://localhost/?foo=bar&qwe=RTY
, the expected ishttp://localhost/?Foo=bar&QWE=RTY
.For the
queryMap()
call thequeryStruct()
and the keys have been converted to lower case at https://github.com/parnurzeal/gorequest/blob/develop/gorequest.go#L539