ES2Web.Delete

public void Delete()

Description

Deletes data from the database at the given URL.

C#

Deletes data from the server with the given tag

// Coroutine which deletes data with a given tag from our server.
public IEnumerator DeleteTag(string tag)
{
    string myURL = "https://www.server.com/ES2.php?webfilename=myFile.txt";
    ES2Web web = new ES2Web(myURL + "&tag=" + tag);
      
    // Send request to delete our data and wait for it to finish.
    yield return StartCoroutine(web.Delete());
      
    if(web.isError)
    {
        // Enter your own code to handle errors here.
        // For a list of error codes, see www.moodkie.com/easysave/ES2Web.ErrorCodes.php
        Debug.LogError(web.errorCode + ":" + web.error);
    }
}

JS

Deletes data from the server with the given tag

// Coroutine which deletes data with a given tag from our server.
public IEnumerator DeleteTag(string tag)
{
    string myURL = "https://www.server.com/ES2.php?webfilename=myFile.txt";
    ES2Web web = new ES2Web(myURL + "&tag=" + tag);
      
    // Send request to delete our data and wait for it to finish.
    yield return StartCoroutine(web.Delete());
      
    if(web.isError)
    {
        // Enter your own code to handle errors here.
        // For a list of error codes, see www.moodkie.com/easysave/ES2Web.ErrorCodes.php
        Debug.LogError(web.errorCode + ":" + web.error);
    }
}