www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - viber.d: How to have dynamic query parameter?

Hi,

I need to implement an Rest API that has kind of dynamic query 
parameter, which is an idea of getting Redis hash's field. I have 
some redis entries set as below

* hmset foo:personA key_a key_b foo bar
* hmset foo:personB key_a key_b foo bar

The API endpoint looks like this

[code]
/get_person_key?person=personA&data.key_a=<pattern>
[/code]

This is to check if the value of personA's `key_a` matches 
against some pattern. This can work around by using nested path, 
e.g, `/get_person_key/:person/:key?queryParam=<pattern>`,  but 
that requires a api spec. updated -- which is not available in my 
case.

Looking at source code of viber's RestInterface doesn't sound 
this is supported.

Thanks for your reading.
May 22 2019