On 3/13/18 12:28 PM, James Blachly wrote:
Hi all,
Why, when using the REST interface generator, are my routes calculated differently depending on the parameter name?
Specifically,
getField(int id)
is routed as:id/field
(and this is true for any in (id1, id2, ...), whereasgetField(int whateverothername)
is routed asfield
with required URL encoded parameterwhateverothername
. Why is there special behavior for ‘id’ , and where can I find this documented?Thanks in advance -- looking forward to playing with vibe.d.
The only place I can find it "documented" online is here:
http://vibed.org/api/vibe.web.rest/registerRestInterface
If you look in the example, it shows :id being used.
But I don't see why it should use "id1" or "id2" anywhere. It's hard to
follow the code to see where this is determined.
I remember reading it in Kai's book.
-Steve