So I need to send 2 separate http requests or use a redirect?
- Send request that creates backups
- Send request that extracts the latest backup name from the list of all
backups and returns it to me?
Exactly.
I'm getting a lot of lag in my applications from having to perform so many calls or redirects to get anything from the server after an update.
If the redirection should really turn out to be a lag (I wouldn’t hope so, because such a call should be really cheap), simply use rest:forward instead of rest:redirect [1].
Or maybe you have a better approach to propose?
Maybe you don’t really need the exact name of the backup, because db:restore can be called without timestamp [2].
Best, Christian
[1] http://docs.basex.org/wiki/RESTXQ#rest:forward [2] http://docs.basex.org/wiki/Database_Module#db:restore