On 9/19/19 2:10 PM, Tobias Pankrath wrote:

Using the REST Interface I want to receive a parameter called 'id' in the body of a POST request, but 'id' has special handling to be embedded into the URL. So I thought, I could use @bodyParam, which does not work. Is this intended and is there a work around to the problem?

Thanks, Tobias

interface WorkQueueAPI
{
    void addJob(Job job);
	
    @bodyParam("id")
    void deleteJob(int id);

    @property Job[] jobs();
}

Yeah, this is an annoying aspect of vibe.d REST. I can think of a couple
ways -- 1. rename the parameter to something like ID. 2. Use a @before
clause to exctract the id from the form data into an _id parameter.

-Steve