mamantoha / crest

HTTP and REST client for Crystal
https://mamantoha.github.io/crest/
MIT License
235 stars 14 forks source link

Issue with Crest::Utils.flatten_params #84

Closed mamantoha closed 6 years ago

mamantoha commented 6 years ago

The documentation says that this code should be correct:

Crest::Utils.flatten_params({:key1 => {:arr => ["1", "2", "3"]}, :key2 => "123"})
# => {"key1[arr][]" => "1", "key1[arr][]" => "2", "key1[arr][]" => "3", "key2" => "123"}

Actual result is {"key1[arr][]" => "3", "key2" => "123"}

mamantoha commented 6 years ago

https://github.com/mamantoha/crest/pull/85