You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The browser behavior (and standard if I can dig up the forms spec) of HTML forms with array-like values is to include a query string with repeated keys.
Will result in ?colors=orange&colors=purple if both options are selected. Instead of parsing this as a list, parseQuery ignores the second value. Furthermore, the query is represented as a lookup map of bytestrings, so has no notion of multiple values per key.
The reason I bring this issue up is this use case: basic HTML form with a multi-select and no JS and a haskell backend using http-types. The http-typesQuery type and parsers fail that use case.
The text was updated successfully, but these errors were encountered:
Fair point. How about this?
We leave Query and QueryItem as is, but make a generic Query-like type that allows putting in Maybe or [], and we just use a generic "append" operation that either replaces or adds an element.
The browser behavior (and standard if I can dig up the forms spec) of HTML forms with array-like values is to include a query string with repeated keys.
This multi-select:
Will result in
?colors=orange&colors=purple
if both options are selected. Instead of parsing this as a list,parseQuery
ignores the second value. Furthermore, the query is represented as a lookup map of bytestrings, so has no notion of multiple values per key.The reason I bring this issue up is this use case: basic HTML form with a multi-select and no JS and a haskell backend using
http-types
. Thehttp-types
Query
type and parsers fail that use case.The text was updated successfully, but these errors were encountered: