Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save bubnenkoff/d07e0e65077ff65cb5f3456922c272ac to your computer and use it in GitHub Desktop.
Save bubnenkoff/d07e0e65077ff65cb5f3456922c272ac to your computer and use it in GitHub Desktop.
void questions(HTTPServerRequest req, HTTPServerResponse res)
{
Json questions = req.json;
// logInfo(questions.toString);
res.writeBody("Hello, World!", "text/plain"); // FIXME
string collectionUrl = "http://localhost:8529/_db/onlinetest/_api/document/?collection=sitetestanswers"; // вот сюда переслать запрос надо
res.writeJsonBody(`{"a":"b"}`);
// Вот тут мне пробую уже даже стороннюю либу
// send incoming questionJson to ArangoDB
auto rq = Request();
// auto rs = rq.post(collectionUrl, questions, "application/json");
auto rs = rq.post(collectionUrl, `{"sdf":"dima"} `, "application/json");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment