0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 05:00:24 +00:00

Change the type of bindings from a list to a map

Maps make more sense because the keys are unique.
This commit is contained in:
Loïc Hoguin 2017-02-19 16:51:16 +01:00
parent 91ae70b06c
commit 9255cdf1d7
No known key found for this signature in database
GPG key ID: 71366FF21851DF03
6 changed files with 25 additions and 33 deletions

View file

@ -114,10 +114,9 @@ binding(Config) ->
<<"default">> = do_get_body("/args/binding/undefined/default", Config),
ok.
%% @todo Do we really want a key/value list here instead of a map?
bindings(Config) ->
doc("Values bound from request URI path."),
<<"[{key,<<\"bindings\">>}]">> = do_get_body("/bindings", Config),
<<"#{key => <<\"bindings\">>}">> = do_get_body("/bindings", Config),
ok.
header(Config) ->