json を url localhost/json に送信します。このリクエストを処理するにはどうすればよいですか? それはどのように機能していますか?独自の WResource、WServer、WApplication などを実装する必要がありますか? Wtを使用してどのように機能するか、私に説明してください。
/* in LoginForm() */
...
client.done().connect(this, &LoginForm::receiveJSONresponse);
...
void LoginForm::sendLogInRequest()
{
Json::Object data;
data["action"] = "login";
data["username"] = usernameTextEdit.text();
data["password"] = passwordTextEdit.text();
Http::Message msg;
msg.addHeader("Content-Type", "application/json");
msg.addHeader("Accept", "application/json");
msg.addBodyText(Json::serialize(data));
client.request(Http::Post, "http://localhost/json", msg);
}