RejectedSoftware Forums

Sign up

One more question regarding REST

I want to process requests of form "/:id/method". Is this currently possible?
Sub-interfaces can only be returned from parameter-less methods, thus I can't find way to provide :id to method.

Re: One more question regarding REST

Am 21.01.2013 20:36, schrieb Dicebot:

I want to process requests of form "/:id/method". Is this currently possible?
Sub-interfaces can only be returned from parameter-less methods, thus I can't find way to provide
:id to method.

void getSomething(int id) {} will be translated to GET /:id/something. This is currently a
special case (first parameter named id) and I plan to eventually replace that with something @UDA
based so that also /:a/:b/:c/method will be possible - but probably only after DMD 2.062 has
arrived for backwards compatibility reasons.

Re: One more question regarding REST

On Mon, 21 Jan 2013 20:56:24 +0100, Sönke Ludwig wrote:

Am 21.01.2013 20:36, schrieb Dicebot:

I want to process requests of form "/:id/method". Is this currently possible?
Sub-interfaces can only be returned from parameter-less methods, thus I can't find way to provide
:id to method.

void getSomething(int id) {} will be translated to GET /:id/something. This is currently a
special case (first parameter named id) and I plan to eventually replace that with something @UDA
based so that also /:a/:b/:c/method will be possible - but probably only after DMD 2.062 has
arrived for backwards compatibility reasons.

Ah, felt it was a special case but got sense of "specialty" wrong :) Thanks!