/// <summary>
/// Async: Get a new, randomly generated UUID from the CouchDB itself for use in new documents.
/// </summary>
/// <returns></returns>
private async Task <string> getNewUUID()
{
string url = _databaseurl + "_uuids";
string retrievedJSON = await HTTPRequests.getRequestAsync(url);
Dictionary <string, string[]> json;
string newUUID = "";
try
{
json = JsonConvert.DeserializeObject <Dictionary <string, string[]> >(retrievedJSON);
newUUID = json["uuids"][0];
}
catch
{ return(""); }
return(newUUID);
}