viber.d: How to have dynamic query parameter?

Anh Huynh ht81073 at gmail.com
Wed May 22 11:50:35 UTC 2019


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.




More information about the Digitalmars-d-learn mailing list