[sr-dev] Pike RPC
Daniel-Constantin Mierla
miconda at gmail.com
Thu Aug 25 12:32:29 CEST 2016
Hello,
no sure why it was developed like this, maybe just a bare translation
from the mi old format.
The proposed format is better and properly following structured
responses for rpc. If you want to develop it, go ahead and then make a
pull request, it will be merged.
Thanks,
Daniel
On 24/08/16 09:47, Kelvin Chua wrote:
> Is there any reason why the Pike RPC is not returning an array and
> instead using integer suffixes? ip_addr0, ip_addr1, etc
>
> If it will not break anything I would like to change this behavior.
>
> here is a sample:
>
> {
> "max_hits":16,
> "ip_addr0":"XX0.5X.X3.1XX",
> "leaf_hits_prev0":51,
> "leaf_hits_curr0":9,
> "expires0":4,
> "status0":"HOT",
> "ip_addr1":"XX8.1X9.8.X7",
> "leaf_hits_prev1":17,
> "leaf_hits_curr1":0,
> "expires1":2,
> "status1":"HOT",
> "number_of_rows":2
> }
>
>
> here is what i propose:
>
> {
> "max_hits":16,
> "number_of_rows":2,
> "list" :
> [
> {
> "ip_addr":"XX0.5X.X3.1XX",
> "leaf_hits_prev":51,
> "leaf_hits_curr":9,
> "expires":4,
> "status":"HOT"
> },
> {
> "ip_addr":"XX8.1X9.8.X7",
> "leaf_hits_prev":17,
> "leaf_hits_curr":0,
> "expires":2,
> "status":"HOT"
> }
> ]
> }
>
> Kelvin Chua
>
>
> _______________________________________________
> sr-dev mailing list
> sr-dev at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla
http://www.asipto.com - http://www.kamailio.org
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20160825/3b3e4c10/attachment.html>
More information about the sr-dev
mailing list