On Mon, 20 Jun 2016 21:38:20 +0200, Jacob Carlborg wrote:
(...)
I see. Is it possible to somehow to do with the current version of
vibe.d, using some form of middleware of before hook? I thinking that
request could be modified to something the REST generator expects./Jacob Carlborg
If you just need to model the server side, it should work with @before
:
private Json extractContents(HTTPServerRequest req, HTTPServerResponse res)
{
return req.json;
}
@before!extractContents("contents")
void postSomething(Json contents)
{
// ...
}
The client side wouldn't really work, though, AFAICS.