fuerte
fuerte copied to clipboard
/_db/[DBNAME]/ endpoint prefix not recognized by default in fuerte::createRequest
If I specify a particular database in the endpoint for fuerte::createRequest(...) using the leading prefix '/_db/[DBNAME]' before the '/_api/[rest-of-endpoint-subpath]' part, the response to the request will fail, and complain about an unknown path.
The workaround, which I believe should be included inside of the createRequest function by default, is to call request->parseArangoPath(
Is there some reason this needs to be an extra step, and shouldn't be part of the createRequest function by default?
More details here: https://stackoverflow.com/questions/60364381/how-to-specify-the-database-in-an-arangodb-aql-query
Idk we do not really use that convenience function in ArangoDB
This would be a fuerte thing related to accessing Arango's REST api, not an Arango thing per se.
If you don't use that function, how have you been able to refer the API to a database other than '_system' ? Things seem to work fine without it as long as you're only accessing _system, whereas with it you are able to target any existing database. Thanks for any more info if you have it.
I haven't found anything in the REST api that allows you to set a different "current" database than _system. Am I doing something wrong? I'm just trying to get different databases for different users happening in a C++ app. Thanks!
Not being an expert on fuerte myself, I think you can set the "database" parameter to direct the request to a specific database: https://github.com/arangodb/fuerte/blob/master/include/fuerte/message.h#L94-L96 Does that solve your problem?