On Saturday, 28 November 2015 at 18:46:05 UTC, Suliman wrote:
And the second question. Why I am getting next error after attempt to write to console JSON request:

Error: cannot resolve type for res.writeJsonBody(T)(T data int status = HTTPStatus.OK, string content_type = "application/json; charset=UF-8", bool allow_chunked = false)

void action(HTTPServerRequest req, HTTPServerResponse res)
{
    writeln(res.writeJsonBody);
}

Eghm, sorry. Not req, but res, but again errr:

void action(HTTPServerRequest req, HTTPServerResponse res)
{
    writeln(req.writeJsonBody);
}

Error: no property 'writeJsonBody' for type 'vibe.http.server.HTTPServerRequest'

But this method are present in docs:

http://vibed.org/api/vibe.http.client/HTTPClientRequest

Reply via email to