I try example from
https://www.arangodb.com/2017/11/introduction-fuerte-arangodb-c-plus-plus-driver/
It compiles, but after
auto request = f::createRequest(f::RestVerb::Post, "/_api/document/blogpost"
s);
request->addVPack(builder.slice());
auto result = connection->sendRequest(std::move(request));
std::stirng key=result->slices().front().get("_key").copyString();
is exception: what(): Cannot execute operation without attribute translator
I do (probably badly)
arangodb::velocypack::AttributeTranslator translator;
arangodb::velocypack::Options::Defaults.attributeTranslator = &translator;
and have exception: what(): Expecting type String
I can read slice attributes in
auto request = f::createRequest(f::RestVerb::Get, "/_api/version"s);
auto result = connection->sendRequest(std::move(request));
assert(result->statusCode() == f::StatusOK);
auto slice = result->slices().front();
auto version = slice.get("version").copyString();
auto server = slice.get("server").copyString();
but after f::RestVerb::Post, I can't
--
You received this message because you are subscribed to the Google Groups
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/arangodb/6832b80d-7ce9-4f7c-b182-a5c47d3777e8o%40googlegroups.com.