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
Pulling from rgrinberg/opium#32 (comment) it would be nice to have a function for extracting multiple query parameters with a single call, similar to:
(* only match if all query params are present *)valget_query_params : Uri.t -> stringlist -> (stringlistlist) option(* allow for partial matches of parameters list *)valget_query_params' : Uri.t -> stringlist -> (stringlistoption) list
usable as:
match get_query_params uri ["ua"; "xx"; "yyy"] with
| Some [ua; xx; yyy] -> ...
|_ -> ...
or, if you're expecting and want to only accept a single argument for a parameter:
match get_query_params uri ["ua"; "xx"; "yyy"] with
| Some [[ua]; [xx]; yyy] -> ... (* Only match if ua and xx are single-valued, yyy gets everything *)|_ -> ...
The text was updated successfully, but these errors were encountered:
Pulling from rgrinberg/opium#32 (comment) it would be nice to have a function for extracting multiple query parameters with a single call, similar to:
usable as:
or, if you're expecting and want to only accept a single argument for a parameter:
The text was updated successfully, but these errors were encountered: